// @codingStandardsIgnoreFile
var Prototype={Version:"1.6.1",Browser:(function(){var B=navigator.userAgent;var A=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!A,Opera:A,WebKit:B.indexOf("AppleWebKit/")>-1,Gecko:B.indexOf("Gecko")>-1&&B.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(B)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var A=window.Element||window.HTMLElement;return !!(A&&A.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var C=document.createElement("div");var B=document.createElement("form");var A=false;if(C.__proto__&&(C.__proto__!==B.__proto__)){A=true}C=B=null;return A})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(A){return A}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var C;for(var B=0,D=arguments.length;B<D;B++){var A=arguments[B];try{C=A();break}catch(E){}}return C}};var Class=(function(){function A(){}function B(){var G=null,F=$A(arguments);if(Object.isFunction(F[0])){G=F.shift()}function D(){this.initialize.apply(this,arguments)}Object.extend(D,Class.Methods);D.superclass=G;D.subclasses=[];if(G){A.prototype=G.prototype;D.prototype=new A;G.subclasses.push(D)}for(var E=0;E<F.length;E++){D.addMethods(F[E])}if(!D.prototype.initialize){D.prototype.initialize=Prototype.emptyFunction}D.prototype.constructor=D;return D}function C(J){var F=this.superclass&&this.superclass.prototype;var E=Object.keys(J);if(!Object.keys({toString:true}).length){if(J.toString!=Object.prototype.toString){E.push("toString")}if(J.valueOf!=Object.prototype.valueOf){E.push("valueOf")}}for(var D=0,G=E.length;D<G;D++){var I=E[D],H=J[I];if(F&&Object.isFunction(H)&&H.argumentNames().first()=="$super"){var K=H;H=(function(L){return function(){return F[L].apply(this,arguments)}})(I).wrap(K);H.valueOf=K.valueOf.bind(K);H.toString=K.toString.bind(K)}this.prototype[I]=H}return this}return{create:B,Methods:{addMethods:C}}})();(function(){var D=Object.prototype.toString;function I(Q,S){for(var R in S){Q[R]=S[R]}return Q}function L(Q){try{if(E(Q)){return"undefined"}if(Q===null){return"null"}return Q.inspect?Q.inspect():String(Q)}catch(R){if(R instanceof RangeError){return"..."}throw R}}function K(Q){var S=typeof Q;switch(S){case"undefined":case"function":case"unknown":return ;case"boolean":return Q.toString()}if(Q===null){return"null"}if(Q.toJSON){return Q.toJSON()}if(H(Q)){return }var R=[];for(var U in Q){var T=K(Q[U]);if(!E(T)){R.push(U.toJSON()+": "+T)}}return"{"+R.join(", ")+"}"}function C(Q){return $H(Q).toQueryString()}function F(Q){return Q&&Q.toHTML?Q.toHTML():String.interpret(Q)}function O(Q){var R=[];for(var S in Q){R.push(S)}return R}function M(Q){var R=[];for(var S in Q){R.push(Q[S])}return R}function J(Q){return I({},Q)}function H(Q){return !!(Q&&Q.nodeType==1)}function G(Q){return D.call(Q)=="[object Array]"}function P(Q){return Q instanceof Hash}function B(Q){return typeof Q==="function"}function A(Q){return D.call(Q)=="[object String]"}function N(Q){return D.call(Q)=="[object Number]"}function E(Q){return typeof Q==="undefined"}I(Object,{extend:I,inspect:L,toJSON:K,toQueryString:C,toHTML:F,keys:O,values:M,clone:J,isElement:H,isArray:G,isHash:P,isFunction:B,isString:A,isNumber:N,isUndefined:E})})();Object.extend(Function.prototype,(function(){var K=Array.prototype.slice;function D(O,L){var N=O.length,M=L.length;while(M--){O[N+M]=L[M]}return O}function I(M,L){M=K.call(M,0);return D(M,L)}function G(){var L=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\s+/g,"").split(",");return L.length==1&&!L[0]?[]:L}function H(N){if(arguments.length<2&&Object.isUndefined(arguments[0])){return this}var L=this,M=K.call(arguments,1);return function(){var O=I(M,arguments);return L.apply(N,O)}}function F(N){var L=this,M=K.call(arguments,1);return function(P){var O=D([P||window.event],M);return L.apply(N,O)}}function J(){if(!arguments.length){return this}var L=this,M=K.call(arguments,0);return function(){var N=I(M,arguments);return L.apply(this,N)}}function E(N){var L=this,M=K.call(arguments,1);N=N*1000;return window.setTimeout(function(){return L.apply(L,M)},N)}function A(){var L=D([0.01],arguments);return this.delay.apply(this,L)}function C(M){var L=this;return function(){var N=D([L.bind(this)],arguments);return M.apply(this,N)}}function B(){if(this._methodized){return this._methodized}var L=this;return this._methodized=function(){var M=D([this],arguments);return L.apply(null,M)}}return{argumentNames:G,bind:H,bindAsEventListener:F,curry:J,delay:E,defer:A,wrap:C,methodize:B}})());Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(A){return String(A).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var PeriodicalExecuter=Class.create({initialize:function(B,A){this.callback=B;this.frequency=A;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},execute:function(){this.callback(this)},stop:function(){if(!this.timer){return }clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute();this.currentlyExecuting=false}catch(A){this.currentlyExecuting=false;throw A}}}});Object.extend(String,{interpret:function(A){return A==null?"":String(A)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,(function(){function prepareReplacement(replacement){if(Object.isFunction(replacement)){return replacement}var template=new Template(replacement);return function(match){return template.evaluate(match)}}function gsub(pattern,replacement){var result="",source=this,match;replacement=prepareReplacement(replacement);if(Object.isString(pattern)){pattern=RegExp.escape(pattern)}if(!(pattern.length||pattern.source)){replacement=replacement("");return replacement+source.split("").join(replacement)+replacement}while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=String.interpret(replacement(match));source=source.slice(match.index+match[0].length)}else{result+=source,source=""}}return result}function sub(pattern,replacement,count){replacement=prepareReplacement(replacement);count=Object.isUndefined(count)?1:count;return this.gsub(pattern,function(match){if(--count<0){return match[0]}return replacement(match)})}function scan(pattern,iterator){this.gsub(pattern,iterator);return String(this)}function truncate(length,truncation){length=length||30;truncation=Object.isUndefined(truncation)?"...":truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:String(this)}function strip(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}function stripTags(){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,"")}function stripScripts(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")}function extractScripts(){var matchAll=new RegExp(Prototype.ScriptFragment,"img");var matchOne=new RegExp(Prototype.ScriptFragment,"im");return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||["",""])[1]})}function evalScripts(){return this.extractScripts().map(function(script){return eval(script)})}function escapeHTML(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function unescapeHTML(){return this.stripTags().replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function toQueryParams(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match){return{}}return match[1].split(separator||"&").inject({},function(hash,pair){if((pair=pair.split("="))[0]){var key=decodeURIComponent(pair.shift());var value=pair.length>1?pair.join("="):pair[0];if(value!=undefined){value=decodeURIComponent(value)}if(key in hash){if(!Object.isArray(hash[key])){hash[key]=[hash[key]]}hash[key].push(value)}else{hash[key]=value}}return hash})}function toArray(){return this.split("")}function succ(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)}function times(count){return count<1?"":new Array(count+1).join(this)}function camelize(){var parts=this.split("-"),len=parts.length;if(len==1){return parts[0]}var camelized=this.charAt(0)=="-"?parts[0].charAt(0).toUpperCase()+parts[0].substring(1):parts[0];for(var i=1;i<len;i++){camelized+=parts[i].charAt(0).toUpperCase()+parts[i].substring(1)}return camelized}function capitalize(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()}function underscore(){return this.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/-/g,"_").toLowerCase()}function dasherize(){return this.replace(/_/g,"-")}function inspect(useDoubleQuotes){var escapedString=this.replace(/[\x00-\x1f\\]/g,function(character){if(character in String.specialChar){return String.specialChar[character]}return"\\u00"+character.charCodeAt().toPaddedString(2,16)});if(useDoubleQuotes){return'"'+escapedString.replace(/"/g,'\\"')+'"'}return"'"+escapedString.replace(/'/g,"\\'")+"'"}function toJSON(){return this.inspect(true)}function unfilterJSON(filter){return this.replace(filter||Prototype.JSONFilter,"$1")}function isJSON(){var str=this;if(str.blank()){return false}str=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str)}function evalJSON(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())}function include(pattern){return this.indexOf(pattern)>-1}function startsWith(pattern){return this.indexOf(pattern)===0}function endsWith(pattern){var d=this.length-pattern.length;return d>=0&&this.lastIndexOf(pattern)===d}function empty(){return this==""}function blank(){return/^\s*$/.test(this)}function interpolate(object,pattern){return new Template(this,pattern).evaluate(object)}return{gsub:gsub,sub:sub,scan:scan,truncate:truncate,strip:String.prototype.trim?String.prototype.trim:strip,stripTags:stripTags,stripScripts:stripScripts,extractScripts:extractScripts,evalScripts:evalScripts,escapeHTML:escapeHTML,unescapeHTML:unescapeHTML,toQueryParams:toQueryParams,parseQuery:toQueryParams,toArray:toArray,succ:succ,times:times,camelize:camelize,capitalize:capitalize,underscore:underscore,dasherize:dasherize,inspect:inspect,toJSON:toJSON,unfilterJSON:unfilterJSON,isJSON:isJSON,evalJSON:evalJSON,include:include,startsWith:startsWith,endsWith:endsWith,empty:empty,blank:blank,interpolate:interpolate}})());var Template=Class.create({initialize:function(A,B){this.template=A.toString();this.pattern=B||Template.Pattern},evaluate:function(A){if(A&&Object.isFunction(A.toTemplateReplacements)){A=A.toTemplateReplacements()}return this.template.gsub(this.pattern,function(D){if(A==null){return(D[1]+"")}var F=D[1]||"";if(F=="\\"){return D[2]}var B=A,G=D[3];var E=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;D=E.exec(G);if(D==null){return F}while(D!=null){var C=D[1].startsWith("[")?D[2].replace(/\\\\]/g,"]"):D[1];B=B[C];if(null==B||""==D[3]){break}G=G.substring("["==D[3]?D[1].length:D[0].length);D=E.exec(G)}return F+String.interpret(B)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable=(function(){function C(Y,X){var W=0;try{this._each(function(a){Y.call(X,a,W++)})}catch(Z){if(Z!=$break){throw Z}}return this}function R(Z,Y,X){var W=-Z,a=[],b=this.toArray();if(Z<1){return b}while((W+=Z)<b.length){a.push(b.slice(W,W+Z))}return a.collect(Y,X)}function B(Y,X){Y=Y||Prototype.K;var W=true;this.each(function(a,Z){W=W&&!!Y.call(X,a,Z);if(!W){throw $break}});return W}function I(Y,X){Y=Y||Prototype.K;var W=false;this.each(function(a,Z){if(W=!!Y.call(X,a,Z)){throw $break}});return W}function J(Y,X){Y=Y||Prototype.K;var W=[];this.each(function(a,Z){W.push(Y.call(X,a,Z))});return W}function T(Y,X){var W;this.each(function(a,Z){if(Y.call(X,a,Z)){W=a;throw $break}});return W}function H(Y,X){var W=[];this.each(function(a,Z){if(Y.call(X,a,Z)){W.push(a)}});return W}function G(Z,Y,X){Y=Y||Prototype.K;var W=[];if(Object.isString(Z)){Z=new RegExp(RegExp.escape(Z))}this.each(function(b,a){if(Z.match(b)){W.push(Y.call(X,b,a))}});return W}function A(W){if(Object.isFunction(this.indexOf)){if(this.indexOf(W)!=-1){return true}}var X=false;this.each(function(Y){if(Y==W){X=true;throw $break}});return X}function Q(X,W){W=Object.isUndefined(W)?null:W;return this.eachSlice(X,function(Y){while(Y.length<X){Y.push(W)}return Y})}function L(W,Y,X){this.each(function(a,Z){W=Y.call(X,W,a,Z)});return W}function V(X){var W=$A(arguments).slice(1);return this.map(function(Y){return Y[X].apply(Y,W)})}function P(Y,X){Y=Y||Prototype.K;var W;this.each(function(a,Z){a=Y.call(X,a,Z);if(W==null||a>=W){W=a}});return W}function N(Y,X){Y=Y||Prototype.K;var W;this.each(function(a,Z){a=Y.call(X,a,Z);if(W==null||a<W){W=a}});return W}function E(Z,X){Z=Z||Prototype.K;var Y=[],W=[];this.each(function(b,a){(Z.call(X,b,a)?Y:W).push(b)});return[Y,W]}function F(X){var W=[];this.each(function(Y){W.push(Y[X])});return W}function D(Y,X){var W=[];this.each(function(a,Z){if(!Y.call(X,a,Z)){W.push(a)}});return W}function M(X,W){return this.map(function(Z,Y){return{value:Z,criteria:X.call(W,Z,Y)}}).sort(function(d,c){var Z=d.criteria,Y=c.criteria;return Z<Y?-1:Z>Y?1:0}).pluck("value")}function O(){return this.map()}function S(){var X=Prototype.K,W=$A(arguments);if(Object.isFunction(W.last())){X=W.pop()}var Y=[this].concat(W).map($A);return this.map(function(a,Z){return X(Y.pluck(Z))})}function K(){return this.toArray().length}function U(){return"#<Enumerable:"+this.toArray().inspect()+">"}return{each:C,eachSlice:R,all:B,every:B,any:I,some:I,collect:J,map:J,detect:T,findAll:H,select:H,filter:H,grep:G,include:A,member:A,inGroupsOf:Q,inject:L,invoke:V,max:P,min:N,partition:E,pluck:F,reject:D,sortBy:M,toArray:O,entries:O,zip:S,size:K,inspect:U,find:T}})();function $A(C){if(!C){return[]}if("toArray" in Object(C)){return C.toArray()}var B=C.length||0,A=new Array(B);while(B--){A[B]=C[B]}return A}function $w(A){if(!Object.isString(A)){return[]}A=A.strip();return A?A.split(/\s+/):[]}Array.from=$A;(function(){var S=Array.prototype,M=S.slice,O=S.forEach;function B(W){for(var V=0,X=this.length;V<X;V++){W(this[V])}}if(!O){O=B}function L(){this.length=0;return this}function D(){return this[0]}function G(){return this[this.length-1]}function I(){return this.select(function(V){return V!=null})}function U(){return this.inject([],function(W,V){if(Object.isArray(V)){return W.concat(V.flatten())}W.push(V);return W})}function H(){var V=M.call(arguments,0);return this.select(function(W){return !V.include(W)})}function F(V){return(V!==false?this:this.toArray())._reverse()}function K(V){return this.inject([],function(Y,X,W){if(0==W||(V?Y.last()!=X:!Y.include(X))){Y.push(X)}return Y})}function P(V){return this.uniq().findAll(function(W){return V.detect(function(X){return W===X})})}function Q(){return M.call(this,0)}function J(){return this.length}function T(){return"["+this.map(Object.inspect).join(", ")+"]"}function R(){var V=[];this.each(function(W){var X=Object.toJSON(W);if(!Object.isUndefined(X)){V.push(X)}});return"["+V.join(", ")+"]"}function A(X,V){V||(V=0);var W=this.length;if(V<0){V=W+V}for(;V<W;V++){if(this[V]===X){return V}}return -1}function N(W,V){V=isNaN(V)?this.length:(V<0?this.length+V:V)+1;var X=this.slice(0,V).reverse().indexOf(W);return(X<0)?X:V-X-1}function C(){var a=M.call(this,0),Y;for(var W=0,X=arguments.length;W<X;W++){Y=arguments[W];if(Object.isArray(Y)&&!("callee" in Y)){for(var V=0,Z=Y.length;V<Z;V++){a.push(Y[V])}}else{a.push(Y)}}return a}Object.extend(S,Enumerable);if(!S._reverse){S._reverse=S.reverse}Object.extend(S,{_each:O,clear:L,first:D,last:G,compact:I,flatten:U,without:H,reverse:F,uniq:K,intersect:P,clone:Q,toArray:Q,size:J,inspect:T,toJSON:R});var E=(function(){return[].concat(arguments)[0][0]!==1})(1,2);if(E){S.concat=C}if(!S.indexOf){S.indexOf=A}if(!S.lastIndexOf){S.lastIndexOf=N}})();function $H(A){return new Hash(A)}var Hash=Class.create(Enumerable,(function(){function E(Q){this._object=Object.isHash(Q)?Q.toObject():Object.clone(Q)}function F(R){for(var Q in this._object){var S=this._object[Q],T=[Q,S];T.key=Q;T.value=S;R(T)}}function K(Q,R){return this._object[Q]=R}function C(Q){if(this._object[Q]!==Object.prototype[Q]){return this._object[Q]}}function N(Q){var R=this._object[Q];delete this._object[Q];return R}function P(){return Object.clone(this._object)}function O(){return this.pluck("key")}function M(){return this.pluck("value")}function G(R){var Q=this.detect(function(S){return S.value===R});return Q&&Q.key}function I(Q){return this.clone().update(Q)}function D(Q){return new Hash(Q).inject(this,function(R,S){R.set(S.key,S.value);return R})}function B(Q,R){if(Object.isUndefined(R)){return Q}return Q+"="+encodeURIComponent(String.interpret(R))}function A(){return this.inject([],function(S,T){var R=encodeURIComponent(T.key),Q=T.value;if(Q&&typeof Q=="object"){if(Object.isArray(Q)){return S.concat(Q.map(B.curry(R)))}}else{S.push(B(R,Q))}return S}).join("&")}function L(){return"#<Hash:{"+this.map(function(Q){return Q.map(Object.inspect).join(": ")}).join(", ")+"}>"}function J(){return Object.toJSON(this.toObject())}function H(){return new Hash(this)}return{initialize:E,_each:F,set:K,get:C,unset:N,toObject:P,toTemplateReplacements:P,keys:O,values:M,index:G,merge:I,update:D,toQueryString:A,inspect:L,toJSON:J,clone:H}})());Hash.from=$H;Object.extend(Number.prototype,(function(){function D(){return this.toPaddedString(2,16)}function E(){return this+1}function A(K,J){$R(0,this,true).each(K,J);return this}function B(L,K){var J=this.toString(K||10);return"0".times(L-J.length)+J}function F(){return isFinite(this)?this.toString():"null"}function I(){return Math.abs(this)}function H(){return Math.round(this)}function G(){return Math.ceil(this)}function C(){return Math.floor(this)}return{toColorPart:D,succ:E,times:A,toPaddedString:B,toJSON:F,abs:I,round:H,ceil:G,floor:C}})());function $R(C,A,B){return new ObjectRange(C,A,B)}var ObjectRange=Class.create(Enumerable,(function(){function B(F,D,E){this.start=F;this.end=D;this.exclusive=E}function C(D){var E=this.start;while(this.include(E)){D(E);E=E.succ()}}function A(D){if(D<this.start){return false}if(this.exclusive){return D<this.end}return D<=this.end}return{initialize:B,_each:C,include:A}})());var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(A){this.responders._each(A)},register:function(A){if(!this.include(A)){this.responders.push(A)}},unregister:function(A){this.responders=this.responders.without(A)},dispatch:function(D,B,C,A){this.each(function(E){if(Object.isFunction(E[D])){try{E[D].apply(E,[B,C,A])}catch(F){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(A){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,A||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters)){this.options.parameters=this.options.parameters.toQueryParams()}else{if(Object.isHash(this.options.parameters)){this.options.parameters=this.options.parameters.toObject()}}}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,B,A){$super(A);this.transport=Ajax.getTransport();this.request(B)},request:function(B){this.url=B;this.method=this.options.method;var D=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){D._method=this.method;this.method="post"}this.parameters=D;if(D=Object.toQueryString(D)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+D}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){D+="&_="}}}try{var A=new Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(A)}Ajax.Responders.dispatch("onCreate",this,A);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){this.respondToReadyState.bind(this).defer(1)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||D):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(C){this.dispatchException(C)}},onStateChange:function(){var A=this.transport.readyState;if(A>1&&!((A==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var E={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){E["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){E.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var C=this.options.requestHeaders;if(Object.isFunction(C.push)){for(var B=0,D=C.length;B<D;B+=2){E[C[B]]=C[B+1]}}else{$H(C).each(function(F){E[F.key]=F.value})}}for(var A in E){this.transport.setRequestHeader(A,E[A])}},success:function(){var A=this.getStatus();return !A||(A>=200&&A<300)},getStatus:function(){try{return this.transport.status||0}catch(A){return 0}},respondToReadyState:function(A){var C=Ajax.Request.Events[A],B=new Ajax.Response(this);if(C=="Complete"){try{this._complete=true;(this.options["on"+B.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(B,B.headerJSON)}catch(D){this.dispatchException(D)}var E=B.getHeader("Content-type");if(this.options.evalJS=="force"||(this.options.evalJS&&this.isSameOrigin()&&E&&E.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))){this.evalResponse()}}try{(this.options["on"+C]||Prototype.emptyFunction)(B,B.headerJSON);Ajax.Responders.dispatch("on"+C,this,B,B.headerJSON)}catch(D){this.dispatchException(D)}if(C=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},isSameOrigin:function(){var A=this.url.match(/^\s*https?:\/\/[^\/]*/);return !A||(A[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""}))},getHeader:function(A){try{return this.transport.getResponseHeader(A)||null}catch(B){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(A){(this.options.onException||Prototype.emptyFunction)(this,A);Ajax.Responders.dispatch("onException",this,A)}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Response=Class.create({initialize:function(C){this.request=C;var D=this.transport=C.transport,A=this.readyState=D.readyState;if((A>2&&!Prototype.Browser.IE)||A==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(D.responseText);this.headerJSON=this._getHeaderJSON()}if(A==4){var B=D.responseXML;this.responseXML=Object.isUndefined(B)?null:B;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(A){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(A){return null}},getResponseHeader:function(A){return this.transport.getResponseHeader(A)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var A=this.getHeader("X-JSON");if(!A){return null}A=decodeURIComponent(escape(A));try{return A.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())}catch(B){this.request.dispatchException(B)}},_getResponseJSON:function(){var A=this.request.options;if(!A.evalJSON||(A.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))||this.responseText.blank()){return null}try{return this.responseText.evalJSON(A.sanitizeJSON||!this.request.isSameOrigin())}catch(B){this.request.dispatchException(B)}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,A,C,B){this.container={success:(A.success||A),failure:(A.failure||(A.success?null:A))};B=Object.clone(B);var D=B.onComplete;B.onComplete=(function(E,F){this.updateContent(E.responseText);if(Object.isFunction(D)){D(E,F)}}).bind(this);$super(C,B)},updateContent:function(D){var C=this.container[this.success()?"success":"failure"],A=this.options;if(!A.evalScripts){D=D.stripScripts()}if(C=$(C)){if(A.insertion){if(Object.isString(A.insertion)){var B={};B[A.insertion]=D;C.insert(B)}else{A.insertion(C,D)}}else{C.update(D)}}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,A,C,B){$super(B);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=A;this.url=C;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(A){if(this.options.decay){this.decay=(A.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=A.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(B){if(arguments.length>1){for(var A=0,D=[],C=arguments.length;A<C;A++){D.push($(arguments[A]))}return D}if(Object.isString(B)){B=document.getElementById(B)}return Element.extend(B)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(F,A){var C=[];var E=document.evaluate(F,$(A)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var B=0,D=E.snapshotLength;B<D;B++){C.push(Element.extend(E.snapshotItem(B)))}return C}}if(!window.Node){var Node={}}if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12})}(function(C){var B=(function(){var F=document.createElement("form");var E=document.createElement("input");var D=document.documentElement;E.setAttribute("name","test");F.appendChild(E);D.appendChild(F);var G=F.elements?(typeof F.elements.test=="undefined"):null;D.removeChild(F);F=E=null;return G})();var A=C.Element;C.Element=function(F,E){E=E||{};F=F.toLowerCase();var D=Element.cache;if(B&&E.name){F="<"+F+' name="'+E.name+'">';delete E.name;return Element.writeAttribute(document.createElement(F),E)}if(!D[F]){D[F]=Element.extend(document.createElement(F))}return Element.writeAttribute(D[F].cloneNode(false),E)};Object.extend(C.Element,A||{});if(A){C.Element.prototype=A.prototype}})(this);Element.cache={};Element.idCounter=1;Element.Methods={visible:function(A){return $(A).style.display!="none"},toggle:function(A){A=$(A);Element[Element.visible(A)?"hide":"show"](A);return A},hide:function(A){A=$(A);A.style.display="none";return A},show:function(A){A=$(A);A.style.display="";return A},remove:function(A){A=$(A);A.parentNode.removeChild(A);return A},update:(function(){var B=(function(){var E=document.createElement("select"),F=true;E.innerHTML='<option value="test">test</option>';if(E.options&&E.options[0]){F=E.options[0].nodeName.toUpperCase()!=="OPTION"}E=null;return F})();var A=(function(){try{var E=document.createElement("table");if(E&&E.tBodies){E.innerHTML="<tbody><tr><td>test</td></tr></tbody>";var G=typeof E.tBodies[0]=="undefined";E=null;return G}}catch(F){return true}})();var D=(function(){var E=document.createElement("script"),G=false;try{E.appendChild(document.createTextNode(""));G=!E.firstChild||E.firstChild&&E.firstChild.nodeType!==3}catch(F){G=true}E=null;return G})();function C(F,G){F=$(F);if(G&&G.toElement){G=G.toElement()}if(Object.isElement(G)){return F.update().insert(G)}G=Object.toHTML(G);var E=F.tagName.toUpperCase();if(E==="SCRIPT"&&D){F.text=G;return F}if(B||A){if(E in Element._insertionTranslations.tags){while(F.firstChild){F.removeChild(F.firstChild)}Element._getContentFromAnonymousElement(E,G.stripScripts()).each(function(H){F.appendChild(H)})}else{F.innerHTML=G.stripScripts()}}else{F.innerHTML=G.stripScripts()}G.evalScripts.bind(G).defer();return F}return C})(),replace:function(B,C){B=$(B);if(C&&C.toElement){C=C.toElement()}else{if(!Object.isElement(C)){C=Object.toHTML(C);var A=B.ownerDocument.createRange();A.selectNode(B);C.evalScripts.bind(C).defer();C=A.createContextualFragment(C.stripScripts())}}B.parentNode.replaceChild(C,B);return B},insert:function(C,E){C=$(C);if(Object.isString(E)||Object.isNumber(E)||Object.isElement(E)||(E&&(E.toElement||E.toHTML))){E={bottom:E}}var D,F,B,G;for(var A in E){D=E[A];A=A.toLowerCase();F=Element._insertionTranslations[A];if(D&&D.toElement){D=D.toElement()}if(Object.isElement(D)){F(C,D);continue}D=Object.toHTML(D);B=((A=="before"||A=="after")?C.parentNode:C).tagName.toUpperCase();G=Element._getContentFromAnonymousElement(B,D.stripScripts());if(A=="top"||A=="after"){G.reverse()}G.each(F.curry(C));D.evalScripts.bind(D).defer()}return C},wrap:function(B,C,A){B=$(B);if(Object.isElement(C)){$(C).writeAttribute(A||{})}else{if(Object.isString(C)){C=new Element(C,A)}else{C=new Element("div",C)}}if(B.parentNode){B.parentNode.replaceChild(C,B)}C.appendChild(B);return C},inspect:function(B){B=$(B);var A="<"+B.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(F){var E=F.first(),C=F.last();var D=(B[E]||"").toString();if(D){A+=" "+C+"="+D.inspect(true)}});return A+">"},recursivelyCollect:function(A,C){A=$(A);var B=[];while(A=A[C]){if(A.nodeType==1){B.push(Element.extend(A))}}return B},ancestors:function(A){return Element.recursivelyCollect(A,"parentNode")},descendants:function(A){return Element.select(A,"*")},firstDescendant:function(A){A=$(A).firstChild;while(A&&A.nodeType!=1){A=A.nextSibling}return $(A)},immediateDescendants:function(A){if(!(A=$(A).firstChild)){return[]}while(A&&A.nodeType!=1){A=A.nextSibling}if(A){return[A].concat($(A).nextSiblings())}return[]},previousSiblings:function(A){return Element.recursivelyCollect(A,"previousSibling")},nextSiblings:function(A){return Element.recursivelyCollect(A,"nextSibling")},siblings:function(A){A=$(A);return Element.previousSiblings(A).reverse().concat(Element.nextSiblings(A))},match:function(B,A){if(Object.isString(A)){A=new Selector(A)}return A.match($(B))},up:function(B,D,A){B=$(B);if(arguments.length==1){return $(B.parentNode)}var C=Element.ancestors(B);return Object.isNumber(D)?C[D]:Selector.findElement(C,D,A)},down:function(B,C,A){B=$(B);if(arguments.length==1){return Element.firstDescendant(B)}return Object.isNumber(C)?Element.descendants(B)[C]:Element.select(B,C)[A||0]},previous:function(B,D,A){B=$(B);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(B))}var C=Element.previousSiblings(B);return Object.isNumber(D)?C[D]:Selector.findElement(C,D,A)},next:function(C,D,B){C=$(C);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(C))}var A=Element.nextSiblings(C);return Object.isNumber(D)?A[D]:Selector.findElement(A,D,B)},select:function(B){var A=Array.prototype.slice.call(arguments,1);return Selector.findChildElements(B,A)},adjacent:function(B){var A=Array.prototype.slice.call(arguments,1);return Selector.findChildElements(B.parentNode,A).without(B)},identify:function(A){A=$(A);var B=Element.readAttribute(A,"id");if(B){return B}do{B="anonymous_element_"+Element.idCounter++}while($(B));Element.writeAttribute(A,"id",B);return B},readAttribute:function(C,A){C=$(C);if(Prototype.Browser.IE){var B=Element._attributeTranslations.read;if(B.values[A]){return B.values[A](C,A)}if(B.names[A]){A=B.names[A]}if(A.include(":")){return(!C.attributes||!C.attributes[A])?null:C.attributes[A].value}}return C.getAttribute(A)},writeAttribute:function(E,C,F){E=$(E);var B={},D=Element._attributeTranslations.write;if(typeof C=="object"){B=C}else{B[C]=Object.isUndefined(F)?true:F}for(var A in B){C=D.names[A]||A;F=B[A];if(D.values[A]){C=D.values[A](E,F)}if(F===false||F===null){E.removeAttribute(C)}else{if(F===true){E.setAttribute(C,C)}else{E.setAttribute(C,F)}}}return E},getHeight:function(A){return Element.getDimensions(A).height},getWidth:function(A){return Element.getDimensions(A).width},classNames:function(A){return new Element.ClassNames(A)},hasClassName:function(A,B){if(!(A=$(A))){return }var C=A.className;return(C.length>0&&(C==B||new RegExp("(^|\\s)"+B+"(\\s|$)").test(C)))},addClassName:function(A,B){if(!(A=$(A))){return }if(!Element.hasClassName(A,B)){A.className+=(A.className?" ":"")+B}return A},removeClassName:function(A,B){if(!(A=$(A))){return }A.className=A.className.replace(new RegExp("(^|\\s+)"+B+"(\\s+|$)")," ").strip();return A},toggleClassName:function(A,B){if(!(A=$(A))){return }return Element[Element.hasClassName(A,B)?"removeClassName":"addClassName"](A,B)},cleanWhitespace:function(B){B=$(B);var C=B.firstChild;while(C){var A=C.nextSibling;if(C.nodeType==3&&!/\S/.test(C.nodeValue)){B.removeChild(C)}C=A}return B},empty:function(A){return $(A).innerHTML.blank()},descendantOf:function(B,A){B=$(B),A=$(A);if(B.compareDocumentPosition){return(B.compareDocumentPosition(A)&8)===8}if(A.contains){return A.contains(B)&&A!==B}while(B=B.parentNode){if(B==A){return true}}return false},scrollTo:function(A){A=$(A);var B=Element.cumulativeOffset(A);window.scrollTo(B[0],B[1]);return A},getStyle:function(B,C){B=$(B);C=C=="float"?"cssFloat":C.camelize();var D=B.style[C];if(!D||D=="auto"){var A=document.defaultView.getComputedStyle(B,null);D=A?A[C]:null}if(C=="opacity"){return D?parseFloat(D):1}return D=="auto"?null:D},getOpacity:function(A){return $(A).getStyle("opacity")},setStyle:function(B,C){B=$(B);var E=B.style,A;if(Object.isString(C)){B.style.cssText+=";"+C;return C.include("opacity")?B.setOpacity(C.match(/opacity:\s*(\d?\.?\d*)/)[1]):B}for(var D in C){if(D=="opacity"){B.setOpacity(C[D])}else{E[(D=="float"||D=="cssFloat")?(Object.isUndefined(E.styleFloat)?"cssFloat":"styleFloat"):D]=C[D]}}return B},setOpacity:function(A,B){A=$(A);A.style.opacity=(B==1||B==="")?"":(B<0.00001)?0:B;return A},getDimensions:function(C){C=$(C);var G=Element.getStyle(C,"display");if(G!="none"&&G!=null){return{width:C.offsetWidth,height:C.offsetHeight}}var B=C.style;var F=B.visibility;var D=B.position;var A=B.display;B.visibility="hidden";if(D!="fixed"){B.position="absolute"}B.display="block";var H=C.clientWidth;var E=C.clientHeight;B.display=A;B.position=D;B.visibility=F;return{width:H,height:E}},makePositioned:function(A){A=$(A);var B=Element.getStyle(A,"position");if(B=="static"||!B){A._madePositioned=true;A.style.position="relative";if(Prototype.Browser.Opera){A.style.top=0;A.style.left=0}}return A},undoPositioned:function(A){A=$(A);if(A._madePositioned){A._madePositioned=undefined;A.style.position=A.style.top=A.style.left=A.style.bottom=A.style.right=""}return A},makeClipping:function(A){A=$(A);if(A._overflow){return A}A._overflow=Element.getStyle(A,"overflow")||"auto";if(A._overflow!=="hidden"){A.style.overflow="hidden"}return A},undoClipping:function(A){A=$(A);if(!A._overflow){return A}A.style.overflow=A._overflow=="auto"?"":A._overflow;A._overflow=null;return A},cumulativeOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent}while(B);return Element._returnOffset(C,A)},positionedOffset:function(B){var A=0,D=0;do{A+=B.offsetTop||0;D+=B.offsetLeft||0;B=B.offsetParent;if(B){if(B.tagName.toUpperCase()=="BODY"){break}var C=Element.getStyle(B,"position");if(C!=="static"){break}}}while(B);return Element._returnOffset(D,A)},absolutize:function(B){B=$(B);if(Element.getStyle(B,"position")=="absolute"){return B}var D=Element.positionedOffset(B);var F=D[1];var E=D[0];var C=B.clientWidth;var A=B.clientHeight;B._originalLeft=E-parseFloat(B.style.left||0);B._originalTop=F-parseFloat(B.style.top||0);B._originalWidth=B.style.width;B._originalHeight=B.style.height;B.style.position="absolute";B.style.top=F+"px";B.style.left=E+"px";B.style.width=C+"px";B.style.height=A+"px";return B},relativize:function(A){A=$(A);if(Element.getStyle(A,"position")=="relative"){return A}A.style.position="relative";var C=parseFloat(A.style.top||0)-(A._originalTop||0);var B=parseFloat(A.style.left||0)-(A._originalLeft||0);A.style.top=C+"px";A.style.left=B+"px";A.style.height=A._originalHeight;A.style.width=A._originalWidth;return A},cumulativeScrollOffset:function(B){var A=0,C=0;do{A+=B.scrollTop||0;C+=B.scrollLeft||0;B=B.parentNode}while(B);return Element._returnOffset(C,A)},getOffsetParent:function(A){if(A.offsetParent){return $(A.offsetParent)}if(A==document.body){return $(A)}while((A=A.parentNode)&&A!=document.body){if(Element.getStyle(A,"position")!="static"){return $(A)}}return $(document.body)},viewportOffset:function(D){var A=0,C=0;var B=D;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body&&Element.getStyle(B,"position")=="absolute"){break}}while(B=B.offsetParent);B=D;do{if(!Prototype.Browser.Opera||(B.tagName&&(B.tagName.toUpperCase()=="BODY"))){A-=B.scrollTop||0;C-=B.scrollLeft||0}}while(B=B.parentNode);return Element._returnOffset(C,A)},clonePosition:function(B,D){var A=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});D=$(D);var E=Element.viewportOffset(D);B=$(B);var F=[0,0];var C=null;if(Element.getStyle(B,"position")=="absolute"){C=Element.getOffsetParent(B);F=Element.viewportOffset(C)}if(C==document.body){F[0]-=document.body.offsetLeft;F[1]-=document.body.offsetTop}if(A.setLeft){B.style.left=(E[0]-F[0]+A.offsetLeft)+"px"}if(A.setTop){B.style.top=(E[1]-F[1]+A.offsetTop)+"px"}if(A.setWidth){B.style.width=D.offsetWidth+"px"}if(A.setHeight){B.style.height=D.offsetHeight+"px"}return B}};Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(D,B,C){switch(C){case"left":case"top":case"right":case"bottom":if(D(B,"position")==="static"){return null}case"height":case"width":if(!Element.visible(B)){return null}var E=parseInt(D(B,C),10);if(E!==B["offset"+C.capitalize()]){return E+"px"}var A;if(C==="height"){A=["border-top-width","padding-top","padding-bottom","border-bottom-width"]}else{A=["border-left-width","padding-left","padding-right","border-right-width"]}return A.inject(E,function(F,G){var H=D(B,G);return H===null?F:F-parseInt(H,10)})+"px";default:return D(B,C)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(C,A,B){if(B==="title"){return A.title}return C(A,B)})}else{if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(C,B){B=$(B);try{B.offsetParent}catch(E){return $(document.body)}var A=B.getStyle("position");if(A!=="static"){return C(B)}B.setStyle({position:"relative"});var D=C(B);B.setStyle({position:A});return D});$w("positionedOffset viewportOffset").each(function(A){Element.Methods[A]=Element.Methods[A].wrap(function(E,C){C=$(C);try{C.offsetParent}catch(G){return Element._returnOffset(0,0)}var B=C.getStyle("position");if(B!=="static"){return E(C)}var D=C.getOffsetParent();if(D&&D.getStyle("position")==="fixed"){D.setStyle({zoom:1})}C.setStyle({position:"relative"});var F=E(C);C.setStyle({position:B});return F})});Element.Methods.cumulativeOffset=Element.Methods.cumulativeOffset.wrap(function(B,A){try{A.offsetParent}catch(C){return Element._returnOffset(0,0)}return B(A)});Element.Methods.getStyle=function(A,B){A=$(A);B=(B=="float"||B=="cssFloat")?"styleFloat":B.camelize();var C=A.style[B];if(!C&&A.currentStyle){C=A.currentStyle[B]}if(B=="opacity"){if(C=(A.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(C[1]){return parseFloat(C[1])/100}}return 1}if(C=="auto"){if((B=="width"||B=="height")&&(A.getStyle("display")!="none")){return A["offset"+B.capitalize()]+"px"}return null}return C};Element.Methods.setOpacity=function(B,E){function F(G){return G.replace(/alpha\([^\)]*\)/gi,"")}B=$(B);var A=B.currentStyle;if((A&&!A.hasLayout)||(!A&&B.style.zoom=="normal")){B.style.zoom=1}var D=B.getStyle("filter"),C=B.style;if(E==1||E===""){(D=F(D))?C.filter=D:C.removeAttribute("filter");return B}else{if(E<0.00001){E=0}}C.filter=F(D)+"alpha(opacity="+(E*100)+")";return B};Element._attributeTranslations=(function(){var B="className";var A="for";var C=document.createElement("div");C.setAttribute(B,"x");if(C.className!=="x"){C.setAttribute("class","x");if(C.className==="x"){B="class"}}C=null;C=document.createElement("label");C.setAttribute(A,"x");if(C.htmlFor!=="x"){C.setAttribute("htmlFor","x");if(C.htmlFor==="x"){A="htmlFor"}}C=null;return{read:{names:{"class":B,className:B,"for":A,htmlFor:A},values:{_getAttr:function(D,E){return D.getAttribute(E)},_getAttr2:function(D,E){return D.getAttribute(E,2)},_getAttrNode:function(D,F){var E=D.getAttributeNode(F);return E?E.value:""},_getEv:(function(){var D=document.createElement("div");D.onclick=Prototype.emptyFunction;var F=D.getAttribute("onclick");var E;if(String(F).indexOf("{")>-1){E=function(G,H){H=G.getAttribute(H);if(!H){return null}H=H.toString();H=H.split("{")[1];H=H.split("}")[0];return H.strip()}}else{if(F===""){E=function(G,H){H=G.getAttribute(H);if(!H){return null}return H.strip()}}}D=null;return E})(),_flag:function(D,E){return $(D).hasAttribute(E)?E:null},style:function(D){return D.style.cssText.toLowerCase()},title:function(D){return D.title}}}}})();Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(A,B){A.checked=!!B},style:function(A,B){A.style.cssText=B?B:""}}};Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc frameBorder").each(function(A){Element._attributeTranslations.write.names[A.toLowerCase()]=A;Element._attributeTranslations.has[A.toLowerCase()]=A});(function(A){Object.extend(A,{href:A._getAttr2,src:A._getAttr2,type:A._getAttr,action:A._getAttrNode,disabled:A._flag,checked:A._flag,readonly:A._flag,multiple:A._flag,onload:A._getEv,onunload:A._getEv,onclick:A._getEv,ondblclick:A._getEv,onmousedown:A._getEv,onmouseup:A._getEv,onmouseover:A._getEv,onmousemove:A._getEv,onmouseout:A._getEv,onfocus:A._getEv,onblur:A._getEv,onkeypress:A._getEv,onkeydown:A._getEv,onkeyup:A._getEv,onsubmit:A._getEv,onreset:A._getEv,onselect:A._getEv,onchange:A._getEv})})(Element._attributeTranslations.read.values);if(Prototype.BrowserFeatures.ElementExtensions){(function(){function A(E){var B=E.getElementsByTagName("*"),D=[];for(var C=0,F;F=B[C];C++){if(F.tagName!=="!"){D.push(F)}}return D}Element.Methods.down=function(C,D,B){C=$(C);if(arguments.length==1){return C.firstDescendant()}return Object.isNumber(D)?A(C)[D]:Element.select(C,D)[B||0]}})()}}else{if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(A,B){A=$(A);A.style.opacity=(B==1)?0.999999:(B==="")?"":(B<0.00001)?0:B;return A}}else{if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(A,B){A=$(A);A.style.opacity=(B==1||B==="")?"":(B<0.00001)?0:B;if(B==1){if(A.tagName.toUpperCase()=="IMG"&&A.width){A.width++;A.width--}else{try{var D=document.createTextNode(" ");A.appendChild(D);A.removeChild(D)}catch(C){}}}return A};Element.Methods.cumulativeOffset=function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}B=B.offsetParent}while(B);return Element._returnOffset(C,A)}}}}}if("outerHTML" in document.documentElement){Element.Methods.replace=function(C,E){C=$(C);if(E&&E.toElement){E=E.toElement()}if(Object.isElement(E)){C.parentNode.replaceChild(E,C);return C}E=Object.toHTML(E);var D=C.parentNode,B=D.tagName.toUpperCase();if(Element._insertionTranslations.tags[B]){var F=C.next();var A=Element._getContentFromAnonymousElement(B,E.stripScripts());D.removeChild(C);if(F){A.each(function(G){D.insertBefore(G,F)})}else{A.each(function(G){D.appendChild(G)})}}else{C.outerHTML=E.stripScripts()}E.evalScripts.bind(E).defer();return C}}Element._returnOffset=function(B,C){var A=[B,C];A.left=B;A.top=C;return A};Element._getContentFromAnonymousElement=function(C,B){var D=new Element("div"),A=Element._insertionTranslations.tags[C];if(A){D.innerHTML=A[0]+B+A[1];A[2].times(function(){D=D.firstChild})}else{D.innerHTML=B}return $A(D.childNodes)};Element._insertionTranslations={before:function(A,B){A.parentNode.insertBefore(B,A)},top:function(A,B){A.insertBefore(B,A.firstChild)},bottom:function(A,B){A.appendChild(B)},after:function(A,B){A.parentNode.insertBefore(B,A.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};(function(){var A=Element._insertionTranslations.tags;Object.extend(A,{THEAD:A.TBODY,TFOOT:A.TBODY,TH:A.TD})})();Element.Methods.Simulated={hasAttribute:function(A,C){C=Element._attributeTranslations.has[C]||C;var B=$(A).getAttributeNode(C);return !!(B&&B.specified)}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);(function(A){if(!Prototype.BrowserFeatures.ElementExtensions&&A.__proto__){window.HTMLElement={};window.HTMLElement.prototype=A.__proto__;Prototype.BrowserFeatures.ElementExtensions=true}A=null})(document.createElement("div"));Element.extend=(function(){function C(G){if(typeof window.Element!="undefined"){var I=window.Element.prototype;if(I){var K="_"+(Math.random()+"").slice(2);var H=document.createElement(G);I[K]="x";var J=(H[K]!=="x");delete I[K];H=null;return J}}return false}function B(H,G){for(var J in G){var I=G[J];if(Object.isFunction(I)&&!(J in H)){H[J]=I.methodize()}}}var D=C("object");if(Prototype.BrowserFeatures.SpecificElementExtensions){if(D){return function(H){if(H&&typeof H._extendedByPrototype=="undefined"){var G=H.tagName;if(G&&(/^(?:object|applet|embed)$/i.test(G))){B(H,Element.Methods);B(H,Element.Methods.Simulated);B(H,Element.Methods.ByTag[G.toUpperCase()])}}return H}}return Prototype.K}var A={},E=Element.Methods.ByTag;var F=Object.extend(function(I){if(!I||typeof I._extendedByPrototype!="undefined"||I.nodeType!=1||I==window){return I}var G=Object.clone(A),H=I.tagName.toUpperCase();if(E[H]){Object.extend(G,E[H])}B(I,G);I._extendedByPrototype=Prototype.emptyFunction;return I},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(A,Element.Methods);Object.extend(A,Element.Methods.Simulated)}}});F.refresh();return F})();Element.hasAttribute=function(A,B){if(A.hasAttribute){return A.hasAttribute(B)}return Element.Methods.Simulated.hasAttribute(A,B)};Element.addMethods=function(C){var J=Prototype.BrowserFeatures,D=Element.Methods.ByTag;if(!C){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var B=C;C=arguments[1]}if(!B){Object.extend(Element.Methods,C||{})}else{if(Object.isArray(B)){B.each(H)}else{H(B)}}function H(F){F=F.toUpperCase();if(!Element.Methods.ByTag[F]){Element.Methods.ByTag[F]={}}Object.extend(Element.Methods.ByTag[F],C)}function A(M,L,F){F=F||false;for(var O in M){var N=M[O];if(!Object.isFunction(N)){continue}if(!F||!(O in L)){L[O]=N.methodize()}}}function E(N){var F;var M={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(M[N]){F="HTML"+M[N]+"Element"}if(window[F]){return window[F]}F="HTML"+N+"Element";if(window[F]){return window[F]}F="HTML"+N.capitalize()+"Element";if(window[F]){return window[F]}var L=document.createElement(N);var O=L.__proto__||L.constructor.prototype;L=null;return O}var I=window.HTMLElement?HTMLElement.prototype:Element.prototype;if(J.ElementExtensions){A(Element.Methods,I);A(Element.Methods.Simulated,I,true)}if(J.SpecificElementExtensions){for(var K in Element.Methods.ByTag){var G=E(K);if(Object.isUndefined(G)){continue}A(D[K],G.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh){Element.extend.refresh()}Element.cache={}};document.viewport={getDimensions:function(){return{width:this.getWidth(),height:this.getHeight()}},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};(function(C){var H=Prototype.Browser,F=document,D,E={};function A(){if(H.WebKit&&!F.evaluate){return document}if(H.Opera&&window.parseFloat(window.opera.version())<9.5){return document.body}return document.documentElement}function G(B){if(!D){D=A()}E[B]="client"+B;C["get"+B]=function(){return D[E[B]]};return C["get"+B]()}C.getWidth=G.curry("Width");C.getHeight=G.curry("Height")})(document.viewport);Element.Storage={UID:1};Element.addMethods({getStorage:function(B){if(!(B=$(B))){return }var A;if(B===window){A=0}else{if(typeof B._prototypeUID==="undefined"){B._prototypeUID=[Element.Storage.UID++]}A=B._prototypeUID[0]}if(!Element.Storage[A]){Element.Storage[A]=$H()}return Element.Storage[A]},store:function(B,A,C){if(!(B=$(B))){return }if(arguments.length===2){Element.getStorage(B).update(A)}else{Element.getStorage(B).set(A,C)}return B},retrieve:function(C,B,A){if(!(C=$(C))){return }var E=Element.getStorage(C),D=E.get(B);if(Object.isUndefined(D)){E.set(B,A);D=A}return D},clone:function(C,A){if(!(C=$(C))){return }var E=C.cloneNode(A);E._prototypeUID=void 0;if(A){var D=Element.select(E,"*"),B=D.length;while(B--){D[B]._prototypeUID=void 0}}return Element.extend(E)}});var Selector=Class.create({initialize:function(A){this.expression=A.strip();if(this.shouldUseSelectorsAPI()){this.mode="selectorsAPI"}else{if(this.shouldUseXPath()){this.mode="xpath";this.compileXPathMatcher()}else{this.mode="normal";this.compileMatcher()}}},shouldUseXPath:(function(){var A=(function(){var E=false;if(document.evaluate&&window.XPathResult){var D=document.createElement("div");D.innerHTML="<ul><li></li></ul><div><ul><li></li></ul></div>";var C=".//*[local-name()='ul' or local-name()='UL']//*[local-name()='li' or local-name()='LI']";var B=document.evaluate(C,D,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);E=(B.snapshotLength!==2);D=null}return E})();return function(){if(!Prototype.BrowserFeatures.XPath){return false}var B=this.expression;if(Prototype.Browser.WebKit&&(B.include("-of-type")||B.include(":empty"))){return false}if((/(\[[\w-]*?:|:checked)/).test(B)){return false}if(A){return false}return true}})(),shouldUseSelectorsAPI:function(){if(!Prototype.BrowserFeatures.SelectorsAPI){return false}if(Selector.CASE_INSENSITIVE_CLASS_NAMES){return false}if(!Selector._div){Selector._div=new Element("div")}try{Selector._div.querySelector(this.expression)}catch(A){return false}return true},compileMatcher:function(){var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m,len=ps.length,name;if(Selector._cache[e]){this.matcher=Selector._cache[e];return }this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i=0;i<len;i++){p=ps[i].re;name=ps[i].name;if(m=e.match(p)){this.matcher.push(Object.isFunction(c[name])?c[name](m):new Template(c[name]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var G=this.expression,H=Selector.patterns,C=Selector.xpath,F,B,A=H.length,D;if(Selector._cache[G]){this.xpath=Selector._cache[G];return }this.matcher=[".//*"];while(G&&F!=G&&(/\S/).test(G)){F=G;for(var E=0;E<A;E++){D=H[E].name;if(B=G.match(H[E].re)){this.matcher.push(Object.isFunction(C[D])?C[D](B):new Template(C[D]).evaluate(B));G=G.replace(B[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(A){A=A||document;var C=this.expression,B;switch(this.mode){case"selectorsAPI":if(A!==document){var D=A.id,E=$(A).identify();E=E.replace(/([\.:])/g,"\\$1");C="#"+E+" "+C}B=$A(A.querySelectorAll(C)).map(Element.extend);A.id=D;return B;case"xpath":return document._getElementsByXPath(this.xpath,A);default:return this.matcher(A)}},match:function(I){this.tokens=[];var M=this.expression,A=Selector.patterns,E=Selector.assertions;var B,D,F,L=A.length,C;while(M&&B!==M&&(/\S/).test(M)){B=M;for(var H=0;H<L;H++){D=A[H].re;C=A[H].name;if(F=M.match(D)){if(E[C]){this.tokens.push([C,Object.clone(F)]);M=M.replace(F[0],"")}else{return this.findElements(document).include(I)}}}}var K=true,C,J;for(var H=0,G;G=this.tokens[H];H++){C=G[0],J=G[1];if(!Selector.assertions[C](I,J)){K=false;break}}return K},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});if(Prototype.BrowserFeatures.SelectorsAPI&&document.compatMode==="BackCompat"){Selector.CASE_INSENSITIVE_CLASS_NAMES=(function(){var C=document.createElement("div"),A=document.createElement("span");C.id="prototype_test_id";A.className="Test";C.appendChild(A);var B=(C.querySelector("#prototype_test_id .test")!==null);C=A=null;return B})()}Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(A){if(A[1]=="*"){return""}return"[local-name()='"+A[1].toLowerCase()+"' or local-name()='"+A[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(A){A[1]=A[1].toLowerCase();return new Template("[@#{1}]").evaluate(A)},attr:function(A){A[1]=A[1].toLowerCase();A[3]=A[5]||A[6];return new Template(Selector.xpath.operators[A[2]]).evaluate(A)},pseudo:function(A){var B=Selector.xpath.pseudos[A[1]];if(!B){return""}if(Object.isFunction(B)){return B(A)}return new Template(Selector.xpath.pseudos[A[1]]).evaluate(A)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0)]",checked:"[@checked]",disabled:"[(@disabled) and (@type!='hidden')]",enabled:"[not(@disabled) and (@type!='hidden')]",not:function(E){var H=E[6],C=Selector.patterns,I=Selector.xpath,A,J,G=C.length,B;var D=[];while(H&&A!=H&&(/\S/).test(H)){A=H;for(var F=0;F<G;F++){B=C[F].name;if(E=H.match(C[F].re)){J=Object.isFunction(I[B])?I[B](E):new Template(I[B]).evaluate(E);D.push("("+J.substring(1,J.length-1)+")");H=H.replace(E[0],"");break}}}return"[not("+D.join(" and ")+")]"},"nth-child":function(A){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",A)},"nth-last-child":function(A){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",A)},"nth-of-type":function(A){return Selector.xpath.pseudos.nth("position() ",A)},"nth-last-of-type":function(A){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",A)},"first-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-of-type"](A)},"last-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](A)},"only-of-type":function(A){var B=Selector.xpath.pseudos;return B["first-of-type"](A)+B["last-of-type"](A)},nth:function(E,C){var F,G=C[6],B;if(G=="even"){G="2n+0"}if(G=="odd"){G="2n+1"}if(F=G.match(/^(\d+)$/)){return"["+E+"= "+F[1]+"]"}if(F=G.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(F[1]=="-"){F[1]=-1}var D=F[1]?Number(F[1]):1;var A=F[2]?Number(F[2]):0;B="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(B).evaluate({fragment:E,a:D,b:A})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);      c = false;',className:'n = h.className(n, r, "#{1}", c);    c = false;',id:'n = h.id(n, r, "#{1}", c);           c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}", c); c = false;',attr:function(A){A[3]=(A[5]||A[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(A)},pseudo:function(A){if(A[6]){A[6]=A[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(A)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:[{name:"laterSibling",re:/^\s*~\s*/},{name:"child",re:/^\s*>\s*/},{name:"adjacent",re:/^\s*\+\s*/},{name:"descendant",re:/^\s/},{name:"tagName",re:/^\s*(\*|[\w\-]+)(\b|$)?/},{name:"id",re:/^#([\w\-\*]+)(\b|$)/},{name:"className",re:/^\.([\w\-\*]+)(\b|$)/},{name:"pseudo",re:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/},{name:"attrPresence",re:/^\[((?:[\w-]+:)?[\w-]+)\]/},{name:"attr",re:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/}],assertions:{tagName:function(A,B){return B[1].toUpperCase()==A.tagName.toUpperCase()},className:function(A,B){return Element.hasClassName(A,B[1])},id:function(A,B){return A.id===B[1]},attrPresence:function(A,B){return Element.hasAttribute(A,B[1])},attr:function(B,C){var A=Element.readAttribute(B,C[1]);return A&&Selector.operators[C[2]](A,C[5]||C[6])}},handlers:{concat:function(B,A){for(var C=0,D;D=A[C];C++){B.push(D)}return B},mark:function(A){var D=Prototype.emptyFunction;for(var B=0,C;C=A[B];B++){C._countedByPrototype=D}return A},unmark:(function(){var A=(function(){var B=document.createElement("div"),E=false,D="_countedByPrototype",C="x";B[D]=C;E=(B.getAttribute(D)===C);B=null;return E})();return A?function(B){for(var C=0,D;D=B[C];C++){D.removeAttribute("_countedByPrototype")}return B}:function(B){for(var C=0,D;D=B[C];C++){D._countedByPrototype=void 0}return B}})(),index:function(A,D,G){A._countedByPrototype=Prototype.emptyFunction;if(D){for(var B=A.childNodes,E=B.length-1,C=1;E>=0;E--){var F=B[E];if(F.nodeType==1&&(!G||F._countedByPrototype)){F.nodeIndex=C++}}}else{for(var E=0,C=1,B=A.childNodes;F=B[E];E++){if(F.nodeType==1&&(!G||F._countedByPrototype)){F.nodeIndex=C++}}}},unique:function(B){if(B.length==0){return B}var D=[],E;for(var C=0,A=B.length;C<A;C++){if(typeof (E=B[C])._countedByPrototype=="undefined"){E._countedByPrototype=Prototype.emptyFunction;D.push(Element.extend(E))}}return Selector.handlers.unmark(D)},descendant:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,E.getElementsByTagName("*"))}return B},child:function(A){var E=Selector.handlers;for(var D=0,C=[],F;F=A[D];D++){for(var B=0,G;G=F.childNodes[B];B++){if(G.nodeType==1&&G.tagName!="!"){C.push(G)}}}return C},adjacent:function(A){for(var C=0,B=[],E;E=A[C];C++){var D=this.nextElementSibling(E);if(D){B.push(D)}}return B},laterSibling:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,Element.nextSiblings(E))}return B},nextElementSibling:function(A){while(A=A.nextSibling){if(A.nodeType==1){return A}}return null},previousElementSibling:function(A){while(A=A.previousSibling){if(A.nodeType==1){return A}}return null},tagName:function(A,H,C,B){var I=C.toUpperCase();var E=[],G=Selector.handlers;if(A){if(B){if(B=="descendant"){for(var F=0,D;D=A[F];F++){G.concat(E,D.getElementsByTagName(C))}return E}else{A=this[B](A)}if(C=="*"){return A}}for(var F=0,D;D=A[F];F++){if(D.tagName.toUpperCase()===I){E.push(D)}}return E}else{return H.getElementsByTagName(C)}},id:function(A,I,B,C){var H=$(B),G=Selector.handlers;if(I==document){if(!H){return[]}if(!A){return[H]}}else{if(!I.sourceIndex||I.sourceIndex<1){var A=I.getElementsByTagName("*");for(var E=0,D;D=A[E];E++){if(D.id===B){return[D]}}}}if(A){if(C){if(C=="child"){for(var F=0,D;D=A[F];F++){if(H.parentNode==D){return[H]}}}else{if(C=="descendant"){for(var F=0,D;D=A[F];F++){if(Element.descendantOf(H,D)){return[H]}}}else{if(C=="adjacent"){for(var F=0,D;D=A[F];F++){if(Selector.handlers.previousElementSibling(H)==D){return[H]}}}else{A=G[C](A)}}}}for(var F=0,D;D=A[F];F++){if(D==H){return[H]}}return[]}return(H&&Element.descendantOf(H,I))?[H]:[]},className:function(B,A,C,D){if(B&&D){B=this[D](B)}return Selector.handlers.byClassName(B,A,C)},byClassName:function(C,B,F){if(!C){C=Selector.handlers.descendant([B])}var H=" "+F+" ";for(var E=0,D=[],G,A;G=C[E];E++){A=G.className;if(A.length==0){continue}if(A==F||(" "+A+" ").include(H)){D.push(G)}}return D},attrPresence:function(C,B,A,G){if(!C){C=B.getElementsByTagName("*")}if(C&&G){C=this[G](C)}var E=[];for(var D=0,F;F=C[D];D++){if(Element.hasAttribute(F,A)){E.push(F)}}return E},attr:function(A,I,H,J,C,B){if(!A){A=I.getElementsByTagName("*")}if(A&&B){A=this[B](A)}var K=Selector.operators[C],F=[];for(var E=0,D;D=A[E];E++){var G=Element.readAttribute(D,H);if(G===null){continue}if(K(G,J)){F.push(D)}}return F},pseudo:function(B,C,E,A,D){if(B&&D){B=this[D](B)}if(!B){B=A.getElementsByTagName("*")}return Selector.pseudos[C](B,E,A)}},pseudos:{"first-child":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.previousElementSibling(E)){continue}C.push(E)}return C},"last-child":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.nextElementSibling(E)){continue}C.push(E)}return C},"only-child":function(B,G,A){var E=Selector.handlers;for(var D=0,C=[],F;F=B[D];D++){if(!E.previousElementSibling(F)&&!E.nextElementSibling(F)){C.push(F)}}return C},"nth-child":function(B,C,A){return Selector.pseudos.nth(B,C,A)},"nth-last-child":function(B,C,A){return Selector.pseudos.nth(B,C,A,true)},"nth-of-type":function(B,C,A){return Selector.pseudos.nth(B,C,A,false,true)},"nth-last-of-type":function(B,C,A){return Selector.pseudos.nth(B,C,A,true,true)},"first-of-type":function(B,C,A){return Selector.pseudos.nth(B,"1",A,false,true)},"last-of-type":function(B,C,A){return Selector.pseudos.nth(B,"1",A,true,true)},"only-of-type":function(B,D,A){var C=Selector.pseudos;return C["last-of-type"](C["first-of-type"](B,D,A),D,A)},getIndices:function(B,A,C){if(B==0){return A>0?[A]:[]}return $R(1,C).inject([],function(D,E){if(0==(E-A)%B&&(E-A)/B>=0){D.push(E)}return D})},nth:function(A,L,N,K,C){if(A.length==0){return[]}if(L=="even"){L="2n+0"}if(L=="odd"){L="2n+1"}var J=Selector.handlers,I=[],B=[],E;J.mark(A);for(var H=0,D;D=A[H];H++){if(!D.parentNode._countedByPrototype){J.index(D.parentNode,K,C);B.push(D.parentNode)}}if(L.match(/^\d+$/)){L=Number(L);for(var H=0,D;D=A[H];H++){if(D.nodeIndex==L){I.push(D)}}}else{if(E=L.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(E[1]=="-"){E[1]=-1}var O=E[1]?Number(E[1]):1;var M=E[2]?Number(E[2]):0;var P=Selector.pseudos.getIndices(O,M,A.length);for(var H=0,D,F=P.length;D=A[H];H++){for(var G=0;G<F;G++){if(D.nodeIndex==P[G]){I.push(D)}}}}}J.unmark(A);J.unmark(B);return I},empty:function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.tagName=="!"||E.firstChild){continue}C.push(E)}return C},not:function(A,D,I){var G=Selector.handlers,J,C;var H=new Selector(D).findElements(I);G.mark(H);for(var F=0,E=[],B;B=A[F];F++){if(!B._countedByPrototype){E.push(B)}}G.unmark(H);return E},enabled:function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(!E.disabled&&(!E.type||E.type!=="hidden")){C.push(E)}}return C},disabled:function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.disabled){C.push(E)}}return C},checked:function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.checked){C.push(E)}}return C}},operators:{"=":function(B,A){return B==A},"!=":function(B,A){return B!=A},"^=":function(B,A){return B==A||B&&B.startsWith(A)},"$=":function(B,A){return B==A||B&&B.endsWith(A)},"*=":function(B,A){return B==A||B&&B.include(A)},"~=":function(B,A){return(" "+B+" ").include(" "+A+" ")},"|=":function(B,A){return("-"+(B||"").toUpperCase()+"-").include("-"+(A||"").toUpperCase()+"-")}},split:function(B){var A=[];B.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(C){A.push(C[1].strip())});return A},matchElements:function(F,G){var E=$$(G),D=Selector.handlers;D.mark(E);for(var C=0,B=[],A;A=F[C];C++){if(A._countedByPrototype){B.push(A)}}D.unmark(E);return B},findElement:function(B,C,A){if(Object.isNumber(C)){A=C;C=false}return Selector.matchElements(B,C||"*")[A||0]},findChildElements:function(E,G){G=Selector.split(G.join(","));var D=[],F=Selector.handlers;for(var C=0,B=G.length,A;C<B;C++){A=new Selector(G[C].strip());F.concat(D,A.findElements(E))}return(B>1)?F.unique(D):D}});if(Prototype.Browser.IE){Object.extend(Selector.handlers,{concat:function(B,A){for(var C=0,D;D=A[C];C++){if(D.tagName!=="!"){B.push(D)}}return B}})}function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(A){A=$(A);A.reset();return A},serializeElements:function(G,B){if(typeof B!="object"){B={hash:!!B}}else{if(Object.isUndefined(B.hash)){B.hash=true}}var C,F,A=false,E=B.submit;var D=G.inject({},function(H,I){if(!I.disabled&&I.name){C=I.name;F=$(I).getValue();if(F!=null&&I.type!="file"&&(I.type!="submit"||(!A&&E!==false&&(!E||C==E)&&(A=true)))){if(C in H){if(!Object.isArray(H[C])){H[C]=[H[C]]}H[C].push(F)}else{H[C]=F}}}return H});return B.hash?D:Object.toQueryString(D)}};Form.Methods={serialize:function(B,A){return Form.serializeElements(Form.getElements(B),A)},getElements:function(E){var F=$(E).getElementsByTagName("*"),D,A=[],C=Form.Element.Serializers;for(var B=0;D=F[B];B++){A.push(D)}return A.inject([],function(G,H){if(C[H.tagName.toLowerCase()]){G.push(Element.extend(H))}return G})},getInputs:function(G,C,D){G=$(G);var A=G.getElementsByTagName("input");if(!C&&!D){return $A(A).map(Element.extend)}for(var E=0,H=[],F=A.length;E<F;E++){var B=A[E];if((C&&B.type!=C)||(D&&B.name!=D)){continue}H.push(Element.extend(B))}return H},disable:function(A){A=$(A);Form.getElements(A).invoke("disable");return A},enable:function(A){A=$(A);Form.getElements(A).invoke("enable");return A},findFirstElement:function(B){var C=$(B).getElements().findAll(function(D){return"hidden"!=D.type&&!D.disabled});var A=C.findAll(function(D){return D.hasAttribute("tabIndex")&&D.tabIndex>=0}).sortBy(function(D){return D.tabIndex}).first();return A?A:C.find(function(D){return/^(?:input|select|textarea)$/i.test(D.tagName)})},focusFirstElement:function(A){A=$(A);A.findFirstElement().activate();return A},request:function(B,A){B=$(B),A=Object.clone(A||{});var D=A.parameters,C=B.readAttribute("action")||"";if(C.blank()){C=window.location.href}A.parameters=B.serialize(true);if(D){if(Object.isString(D)){D=D.toQueryParams()}Object.extend(A.parameters,D)}if(B.hasAttribute("method")&&!A.method){A.method=B.method}return new Ajax.Request(C,A)}};Form.Element={focus:function(A){$(A).focus();return A},select:function(A){$(A).select();return A}};Form.Element.Methods={serialize:function(A){A=$(A);if(!A.disabled&&A.name){var B=A.getValue();if(B!=undefined){var C={};C[A.name]=B;return Object.toQueryString(C)}}return""},getValue:function(A){A=$(A);var B=A.tagName.toLowerCase();return Form.Element.Serializers[B](A)},setValue:function(A,B){A=$(A);var C=A.tagName.toLowerCase();Form.Element.Serializers[C](A,B);return A},clear:function(A){$(A).value="";return A},present:function(A){return $(A).value!=""},activate:function(A){A=$(A);try{A.focus();if(A.select&&(A.tagName.toLowerCase()!="input"||!(/^(?:button|reset|submit)$/i.test(A.type)))){A.select()}}catch(B){}return A},disable:function(A){A=$(A);A.disabled=true;return A},enable:function(A){A=$(A);A.disabled=false;return A}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(A,B){switch(A.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(A,B);default:return Form.Element.Serializers.textarea(A,B)}},inputSelector:function(A,B){if(Object.isUndefined(B)){return A.checked?A.value:null}else{A.checked=!!B}},textarea:function(A,B){if(Object.isUndefined(B)){return A.value}else{A.value=B}},select:function(C,F){if(Object.isUndefined(F)){return this[C.type=="select-one"?"selectOne":"selectMany"](C)}else{var B,D,G=!Object.isArray(F);for(var A=0,E=C.length;A<E;A++){B=C.options[A];D=this.optionValue(B);if(G){if(D==F){B.selected=true;return }}else{B.selected=F.include(D)}}}},selectOne:function(B){var A=B.selectedIndex;return A>=0?this.optionValue(B.options[A]):null},selectMany:function(D){var A,E=D.length;if(!E){return null}for(var C=0,A=[];C<E;C++){var B=D.options[C];if(B.selected){A.push(this.optionValue(B))}}return A},optionValue:function(A){return Element.extend(A).hasAttribute("value")?A.value:A.text}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,A,B,C){$super(C,B);this.element=$(A);this.lastValue=this.getValue()},execute:function(){var A=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(A)?this.lastValue!=A:String(this.lastValue)!=String(A)){this.callback(this.element,A);this.lastValue=A}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=Class.create({initialize:function(A,B){this.element=$(A);this.callback=B;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(A){if(A.type){switch(A.type.toLowerCase()){case"checkbox":case"radio":Event.observe(A,"click",this.onElementEvent.bind(this));break;default:Event.observe(A,"change",this.onElementEvent.bind(this));break}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});(function(){var V={KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{}};var E=document.documentElement;var W="onmouseenter" in E&&"onmouseleave" in E;var O;if(Prototype.Browser.IE){var H={0:1,1:4,2:2};O=function(Y,X){return Y.button===H[X]}}else{if(Prototype.Browser.WebKit){O=function(Y,X){switch(X){case 0:return Y.which==1&&!Y.metaKey;case 1:return Y.which==1&&Y.metaKey;default:return false}}}else{O=function(Y,X){return Y.which?(Y.which===X+1):(Y.button===X)}}}function R(X){return O(X,0)}function Q(X){return O(X,1)}function K(X){return O(X,2)}function C(Z){Z=V.extend(Z);var Y=Z.target,X=Z.type,a=Z.currentTarget;if(a&&a.tagName){if(X==="load"||X==="error"||(X==="click"&&a.tagName.toLowerCase()==="input"&&a.type==="radio")){Y=a}}if(Y.nodeType==Node.TEXT_NODE){Y=Y.parentNode}return Element.extend(Y)}function M(Y,a){var X=V.element(Y);if(!a){return X}var Z=[X].concat(X.ancestors());return Selector.findElement(Z,a,0)}function P(X){return{x:B(X),y:A(X)}}function B(Z){var Y=document.documentElement,X=document.body||{scrollLeft:0};return Z.pageX||(Z.clientX+(Y.scrollLeft||X.scrollLeft)-(Y.clientLeft||0))}function A(Z){var Y=document.documentElement,X=document.body||{scrollTop:0};return Z.pageY||(Z.clientY+(Y.scrollTop||X.scrollTop)-(Y.clientTop||0))}function N(X){V.extend(X);X.preventDefault();X.stopPropagation();X.stopped=true}V.Methods={isLeftClick:R,isMiddleClick:Q,isRightClick:K,element:C,findElement:M,pointer:P,pointerX:B,pointerY:A,stop:N};var T=Object.keys(V.Methods).inject({},function(X,Y){X[Y]=V.Methods[Y].methodize();return X});if(Prototype.Browser.IE){function G(Y){var X;switch(Y.type){case"mouseover":X=Y.fromElement;break;case"mouseout":X=Y.toElement;break;default:return null}return Element.extend(X)}Object.extend(T,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});V.extend=function(Y,X){if(!Y){return false}if(Y._extendedByPrototype){return Y}Y._extendedByPrototype=Prototype.emptyFunction;var Z=V.pointer(Y);Object.extend(Y,{target:Y.srcElement||X,relatedTarget:G(Y),pageX:Z.x,pageY:Z.y});return Object.extend(Y,T)}}else{V.prototype=window.Event.prototype||document.createEvent("HTMLEvents").__proto__;Object.extend(V.prototype,T);V.extend=Prototype.K}function L(b,a,c){var Z=Element.retrieve(b,"prototype_event_registry");if(Object.isUndefined(Z)){D.push(b);Z=Element.retrieve(b,"prototype_event_registry",$H())}var X=Z.get(a);if(Object.isUndefined(X)){X=[];Z.set(a,X)}if(X.pluck("handler").include(c)){return false}var Y;if(a.include(":")){Y=function(d){if(Object.isUndefined(d.eventName)){return false}if(d.eventName!==a){return false}V.extend(d,b);c.call(b,d)}}else{if(!W&&(a==="mouseenter"||a==="mouseleave")){if(a==="mouseenter"||a==="mouseleave"){Y=function(f){V.extend(f,b);var d=f.relatedTarget;while(d&&d!==b){try{d=d.parentNode}catch(g){d=b}}if(d===b){return }c.call(b,f)}}}else{Y=function(d){V.extend(d,b);c.call(b,d)}}}Y.handler=c;X.push(Y);return Y}function F(){for(var X=0,Y=D.length;X<Y;X++){V.stopObserving(D[X]);D[X]=null}}var D=[];if(Prototype.Browser.IE){window.attachEvent("onunload",F)}if(Prototype.Browser.WebKit){window.addEventListener("unload",Prototype.emptyFunction,false)}var J=Prototype.K;if(!W){J=function(Y){var X={mouseenter:"mouseover",mouseleave:"mouseout"};return Y in X?X[Y]:Y}}function S(a,Z,b){a=$(a);var Y=L(a,Z,b);if(!Y){return a}if(Z.include(":")){if(a.addEventListener){a.addEventListener("dataavailable",Y,false)}else{a.attachEvent("ondataavailable",Y);a.attachEvent("onfilterchange",Y)}}else{var X=J(Z);if(a.addEventListener){a.addEventListener(X,Y,false)}else{a.attachEvent("on"+X,Y)}}return a}function I(c,a,d){c=$(c);var Z=Element.retrieve(c,"prototype_event_registry");if(Object.isUndefined(Z)){return c}if(a&&!d){var b=Z.get(a);if(Object.isUndefined(b)){return c}b.each(function(e){Element.stopObserving(c,a,e.handler)});return c}else{if(!a){Z.each(function(g){var e=g.key,f=g.value;f.each(function(h){Element.stopObserving(c,e,h.handler)})});return c}}var b=Z.get(a);if(!b){return }var Y=b.find(function(e){return e.handler===d});if(!Y){return c}var X=J(a);if(a.include(":")){if(c.removeEventListener){c.removeEventListener("dataavailable",Y,false)}else{c.detachEvent("ondataavailable",Y);c.detachEvent("onfilterchange",Y)}}else{if(c.removeEventListener){c.removeEventListener(X,Y,false)}else{c.detachEvent("on"+X,Y)}}Z.set(a,b.without(Y));return c}function U(a,Z,Y,X){a=$(a);if(Object.isUndefined(X)){X=true}if(a==document&&document.createEvent&&!a.dispatchEvent){a=document.documentElement}var b;if(document.createEvent){b=document.createEvent("HTMLEvents");b.initEvent("dataavailable",true,true)}else{b=document.createEventObject();b.eventType=X?"ondataavailable":"onfilterchange"}b.eventName=Z;b.memo=Y||{};if(document.createEvent){a.dispatchEvent(b)}else{a.fireEvent(b.eventType,b)}return V.extend(b)}Object.extend(V,V.Methods);Object.extend(V,{fire:U,observe:S,stopObserving:I});Element.addMethods({fire:U,observe:S,stopObserving:I});Object.extend(document,{fire:U.methodize(),observe:S.methodize(),stopObserving:I.methodize(),loaded:false});if(window.Event){Object.extend(window.Event,V)}else{window.Event=V}})();(function(){var D;function A(){if(document.loaded){return }if(D){window.clearTimeout(D)}document.loaded=true;document.fire("dom:loaded")}function C(){if(document.readyState==="complete"){document.stopObserving("readystatechange",C);A()}}function B(){try{document.documentElement.doScroll("left")}catch(E){D=B.defer();return }A()}if(document.addEventListener){document.addEventListener("DOMContentLoaded",A,false)}else{document.observe("readystatechange",C);if(window==top){D=B.defer()}}Event.observe(window,"load",A)})();Element.addMethods();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(A,B){return Element.insert(A,{before:B})},Top:function(A,B){return Element.insert(A,{top:B})},Bottom:function(A,B){return Element.insert(A,{bottom:B})},After:function(A,B){return Element.insert(A,{after:B})}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},within:function(B,A,C){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(B,A,C)}this.xcomp=A;this.ycomp=C;this.offset=Element.cumulativeOffset(B);return(C>=this.offset[1]&&C<this.offset[1]+B.offsetHeight&&A>=this.offset[0]&&A<this.offset[0]+B.offsetWidth)},withinIncludingScrolloffsets:function(B,A,D){var C=Element.cumulativeScrollOffset(B);this.xcomp=A+C[0]-this.deltaX;this.ycomp=D+C[1]-this.deltaY;this.offset=Element.cumulativeOffset(B);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+B.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+B.offsetWidth)},overlap:function(B,A){if(!B){return 0}if(B=="vertical"){return((this.offset[1]+A.offsetHeight)-this.ycomp)/A.offsetHeight}if(B=="horizontal"){return((this.offset[0]+A.offsetWidth)-this.xcomp)/A.offsetWidth}},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(A){Position.prepare();return Element.absolutize(A)},relativize:function(A){Position.prepare();return Element.relativize(A)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(B,C,A){A=A||{};return Element.clonePosition(C,B,A)}};if(!document.getElementsByClassName){document.getElementsByClassName=function(B){function A(C){return C.blank()?null:"[contains(concat(' ', @class, ' '), ' "+C+" ')]"}B.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(C,E){E=E.toString().strip();var D=/\s/.test(E)?$w(E).map(A).join(""):A(E);return D?document._getElementsByXPath(".//*"+D,C):[]}:function(E,F){F=F.toString().strip();var G=[],H=(/\s/.test(F)?$w(F):null);if(!H&&!F){return G}var C=$(E).getElementsByTagName("*");F=" "+F+" ";for(var D=0,J,I;J=C[D];D++){if(J.className&&(I=" "+J.className+" ")&&(I.include(F)||(H&&H.all(function(K){return !K.toString().blank()&&I.include(" "+K+" ")})))){G.push(Element.extend(J))}}return G};return function(D,C){return $(C||document.body).getElementsByClassName(D)}}(Element.Methods)}Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(A){this.element=$(A)},_each:function(A){this.element.className.split(/\s+/).select(function(B){return B.length>0})._each(A)},set:function(A){this.element.className=A},add:function(A){if(this.include(A)){return }this.set($A(this).concat(A).join(" "))},remove:function(A){if(!this.include(A)){return }this.set($A(this).without(A).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Scriptaculous={Version:"1.8.3",require:function(B){try{document.write('<script type="text/javascript" src="'+B+'"><\/script>')}catch(C){var A=document.createElement("script");A.type="text/javascript";A.src=B;document.getElementsByTagName("head")[0].appendChild(A)}},REQUIRED_PROTOTYPE:"1.6.0.3",load:function(){function A(B){var C=B.replace(/_.*|\./g,"");C=parseInt(C+"0".times(4-C.length));return B.indexOf("_")>-1?C-1:C}if((typeof Prototype=="undefined")||(typeof Element=="undefined")||(typeof Element.Methods=="undefined")||(A(Prototype.Version)<A(Scriptaculous.REQUIRED_PROTOTYPE))){throw ("script.aculo.us requires the Prototype JavaScript framework >= "+Scriptaculous.REQUIRED_PROTOTYPE)}}};Scriptaculous.load();var Builder={NODEMAP:{AREA:"map",CAPTION:"table",COL:"table",COLGROUP:"table",LEGEND:"fieldset",OPTGROUP:"select",OPTION:"select",PARAM:"object",TBODY:"table",TD:"table",TFOOT:"table",TH:"table",THEAD:"table",TR:"table"},node:function(A){A=A.toUpperCase();var F=this.NODEMAP[A]||"div";var B=document.createElement(F);try{B.innerHTML="<"+A+"></"+A+">"}catch(E){}var D=B.firstChild||null;if(D&&(D.tagName.toUpperCase()!=A)){D=D.getElementsByTagName(A)[0]}if(!D){D=document.createElement(A)}if(!D){return }if(arguments[1]){if(this._isStringOrNumber(arguments[1])||(arguments[1] instanceof Array)||arguments[1].tagName){this._children(D,arguments[1])}else{var C=this._attributes(arguments[1]);if(C.length){try{B.innerHTML="<"+A+" "+C+"></"+A+">"}catch(E){}D=B.firstChild||null;if(!D){D=document.createElement(A);for(attr in arguments[1]){D[attr=="class"?"className":attr]=arguments[1][attr]}}if(D.tagName.toUpperCase()!=A){D=B.getElementsByTagName(A)[0]}}}}if(arguments[2]){this._children(D,arguments[2])}return $(D)},_text:function(A){return document.createTextNode(A)},ATTR_MAP:{className:"class",htmlFor:"for"},_attributes:function(A){var B=[];for(attribute in A){B.push((attribute in this.ATTR_MAP?this.ATTR_MAP[attribute]:attribute)+'="'+A[attribute].toString().escapeHTML().gsub(/"/,"&quot;")+'"')}return B.join(" ")},_children:function(B,A){if(A.tagName){B.appendChild(A);return }if(typeof A=="object"){A.flatten().each(function(C){if(typeof C=="object"){B.appendChild(C)}else{if(Builder._isStringOrNumber(C)){B.appendChild(Builder._text(C))}}})}else{if(Builder._isStringOrNumber(A)){B.appendChild(Builder._text(A))}}},_isStringOrNumber:function(A){return(typeof A=="string"||typeof A=="number")},build:function(B){var A=this.node("div");$(A).update(B.strip());return A.down()},dump:function(B){if(typeof B!="object"&&typeof B!="function"){B=window}var A=("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);A.each(function(C){B[C]=function(){return Builder.node.apply(Builder,[C].concat($A(arguments)))}})}};String.prototype.parseColor=function(){var A="#";if(this.slice(0,4)=="rgb("){var C=this.slice(4,this.length-1).split(",");var B=0;do{A+=parseInt(C[B]).toColorPart()}while(++B<3)}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var B=1;B<4;B++){A+=(this.charAt(B)+this.charAt(B)).toLowerCase()}}if(this.length==7){A=this.toLowerCase()}}}return(A.length==7?A:(arguments[0]||this))};Element.collectTextNodes=function(A){return $A($(A).childNodes).collect(function(B){return(B.nodeType==3?B.nodeValue:(B.hasChildNodes()?Element.collectTextNodes(B):""))}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(A,B){return $A($(A).childNodes).collect(function(C){return(C.nodeType==3?C.nodeValue:((C.hasChildNodes()&&!Element.hasClassName(C,B))?Element.collectTextNodesIgnoreClass(C,B):""))}).flatten().join("")};Element.setContentZoom=function(A,B){A=$(A);A.setStyle({fontSize:(B/100)+"em"});if(Prototype.Browser.WebKit){window.scrollBy(0,0)}return A};Element.getInlineOpacity=function(A){return $(A).style.opacity||""};Element.forceRerendering=function(A){try{A=$(A);var C=document.createTextNode(" ");A.appendChild(C);A.removeChild(C)}catch(B){}};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(A){return(-Math.cos(A*Math.PI)/2)+0.5},reverse:function(A){return 1-A},flicker:function(A){var A=((-Math.cos(A*Math.PI)/4)+0.75)+Math.random()/4;return A>1?1:A},wobble:function(A){return(-Math.cos(A*Math.PI*(9*A))/2)+0.5},pulse:function(B,A){return(-Math.cos((B*((A||5)-0.5)*2)*Math.PI)/2)+0.5},spring:function(A){return 1-(Math.cos(A*4.5*Math.PI)*Math.exp(-A*6))},none:function(A){return 0},full:function(A){return 1}},DefaultOptions:{duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(A){var B="position:relative";if(Prototype.Browser.IE){B+=";zoom:1"}A=$(A);$A(A.childNodes).each(function(C){if(C.nodeType==3){C.nodeValue.toArray().each(function(D){A.insertBefore(new Element("span",{style:B}).update(D==" "?String.fromCharCode(160):D),C)});Element.remove(C)}})},multiple:function(B,C){var E;if(((typeof B=="object")||Object.isFunction(B))&&(B.length)){E=B}else{E=$(B).childNodes}var A=Object.extend({speed:0.1,delay:0},arguments[2]||{});var D=A.delay;$A(E).each(function(G,F){new C(G,Object.extend(A,{delay:F*A.speed+D}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(B,C,A){B=$(B);C=(C||"appear").toLowerCase();return Effect[Effect.PAIRS[C][B.visible()?1:0]](B,Object.extend({queue:{position:"end",scope:(B.id||"global"),limit:1}},A||{}))}};Effect.DefaultOptions.transition=Effect.Transitions.sinoidal;Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[];this.interval=null},_each:function(A){this.effects._each(A)},add:function(B){var C=new Date().getTime();var A=Object.isString(B.options.queue)?B.options.queue:B.options.queue.position;switch(A){case"front":this.effects.findAll(function(D){return D.state=="idle"}).each(function(D){D.startOn+=B.finishOn;D.finishOn+=B.finishOn});break;case"with-last":C=this.effects.pluck("startOn").max()||C;break;case"end":C=this.effects.pluck("finishOn").max()||C;break}B.startOn+=C;B.finishOn+=C;if(!B.options.queue.limit||(this.effects.length<B.options.queue.limit)){this.effects.push(B)}if(!this.interval){this.interval=setInterval(this.loop.bind(this),15)}},remove:function(A){this.effects=this.effects.reject(function(B){return B==A});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var C=new Date().getTime();for(var B=0,A=this.effects.length;B<A;B++){this.effects[B]&&this.effects[B].loop(C)}}});Effect.Queues={instances:$H(),get:function(A){if(!Object.isString(A)){return A}return this.instances.get(A)||this.instances.set(A,new Effect.ScopedQueue())}};Effect.Queue=Effect.Queues.get("global");Effect.Base=Class.create({position:null,start:function(A){if(A&&A.transition===false){A.transition=Effect.Transitions.linear}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),A||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.fromToDelta=this.options.to-this.options.from;this.totalTime=this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;this.render=(function(){function B(D,C){if(D.options[C+"Internal"]){D.options[C+"Internal"](D)}if(D.options[C]){D.options[C](D)}}return function(C){if(this.state==="idle"){this.state="running";B(this,"beforeSetup");if(this.setup){this.setup()}B(this,"afterSetup")}if(this.state==="running"){C=(this.options.transition(C)*this.fromToDelta)+this.options.from;this.position=C;B(this,"beforeUpdate");if(this.update){this.update(C)}B(this,"afterUpdate")}}})();this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)}},loop:function(C){if(C>=this.startOn){if(C>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish()}this.event("afterFinish");return }var B=(C-this.startOn)/this.totalTime,A=(B*this.totalFrames).round();if(A>this.currentFrame){this.render(B);this.currentFrame=A}}},cancel:function(){if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this)}this.state="finished"},event:function(A){if(this.options[A+"Internal"]){this.options[A+"Internal"](this)}if(this.options[A]){this.options[A](this)}},inspect:function(){var A=$H();for(property in this){if(!Object.isFunction(this[property])){A.set(property,this[property])}}return"#<Effect:"+A.inspect()+",options:"+$H(this.options).inspect()+">"}});Effect.Parallel=Class.create(Effect.Base,{initialize:function(A){this.effects=A||[];this.start(arguments[1])},update:function(A){this.effects.invoke("render",A)},finish:function(A){this.effects.each(function(B){B.render(1);B.cancel();B.event("beforeFinish");if(B.finish){B.finish(A)}B.event("afterFinish")})}});Effect.Tween=Class.create(Effect.Base,{initialize:function(C,F,E){C=Object.isString(C)?$(C):C;var B=$A(arguments),D=B.last(),A=B.length==5?B[3]:null;this.method=Object.isFunction(D)?D.bind(C):Object.isFunction(C[D])?C[D].bind(C):function(G){C[D]=G};this.start(Object.extend({from:F,to:E},A||{}))},update:function(A){this.method(A)}});Effect.Event=Class.create(Effect.Base,{initialize:function(){this.start(Object.extend({duration:0},arguments[0]||{}))},update:Prototype.emptyFunction});Effect.Opacity=Class.create(Effect.Base,{initialize:function(B){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}var A=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(A)},update:function(A){this.element.setOpacity(A)}});Effect.Move=Class.create(Effect.Base,{initialize:function(B){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(A)},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(A){this.element.setStyle({left:(this.options.x*A+this.originalLeft).round()+"px",top:(this.options.y*A+this.originalTop).round()+"px"})}});Effect.MoveBy=function(B,A,C){return new Effect.Move(B,Object.extend({x:C,y:A},arguments[3]||{}))};Effect.Scale=Class.create(Effect.Base,{initialize:function(B,C){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:C},arguments[2]||{});this.start(A)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(B){this.originalStyle[B]=this.element.style[B]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var A=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(B){if(A.indexOf(B)>0){this.fontSize=parseFloat(A);this.fontSizeType=B}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(A){var B=(this.options.scaleFrom/100)+(this.factor*A);if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*B+this.fontSizeType})}this.setDimensions(this.dims[0]*B,this.dims[1]*B)},finish:function(A){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)}},setDimensions:function(A,D){var E={};if(this.options.scaleX){E.width=D.round()+"px"}if(this.options.scaleY){E.height=A.round()+"px"}if(this.options.scaleFromCenter){var C=(A-this.dims[0])/2;var B=(D-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){E.top=this.originalTop-C+"px"}if(this.options.scaleX){E.left=this.originalLeft-B+"px"}}else{if(this.options.scaleY){E.top=-C+"px"}if(this.options.scaleX){E.left=-B+"px"}}}this.element.setStyle(E)}});Effect.Highlight=Class.create(Effect.Base,{initialize:function(B){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(A)},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return }this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");this.element.setStyle({backgroundImage:"none"})}if(!this.options.endcolor){this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")}if(!this.options.restorecolor){this.options.restorecolor=this.element.getStyle("background-color")}this._base=$R(0,2).map(function(A){return parseInt(this.options.startcolor.slice(A*2+1,A*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(A){return parseInt(this.options.endcolor.slice(A*2+1,A*2+3),16)-this._base[A]}.bind(this))},update:function(A){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(B,C,D){return B+((this._base[D]+(this._delta[D]*A)).round().toColorPart())}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=function(C){var B=arguments[1]||{},A=document.viewport.getScrollOffsets(),D=$(C).cumulativeOffset();if(B.offset){D[1]+=B.offset}return new Effect.Tween(null,A.top,D[1],B,function(E){scrollTo(A.left,E.round())})};Effect.Fade=function(C){C=$(C);var A=C.getInlineOpacity();var B=Object.extend({from:C.getOpacity()||1,to:0,afterFinishInternal:function(D){if(D.options.to!=0){return }D.element.hide().setStyle({opacity:A})}},arguments[1]||{});return new Effect.Opacity(C,B)};Effect.Appear=function(B){B=$(B);var A=Object.extend({from:(B.getStyle("display")=="none"?0:B.getOpacity()||0),to:1,afterFinishInternal:function(C){C.element.forceRerendering()},beforeSetup:function(C){C.element.setOpacity(C.options.from).show()}},arguments[1]||{});return new Effect.Opacity(B,A)};Effect.Puff=function(B){B=$(B);var A={opacity:B.getInlineOpacity(),position:B.getStyle("position"),top:B.style.top,left:B.style.left,width:B.style.width,height:B.style.height};return new Effect.Parallel([new Effect.Scale(B,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(B,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(C){Position.absolutize(C.effects[0].element)},afterFinishInternal:function(C){C.effects[0].element.hide().setStyle(A)}},arguments[1]||{}))};Effect.BlindUp=function(A){A=$(A);A.makeClipping();return new Effect.Scale(A,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(B){B.element.hide().undoClipping()}},arguments[1]||{}))};Effect.BlindDown=function(B){B=$(B);var A=B.getDimensions();return new Effect.Scale(B,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:A.height,originalWidth:A.width},restoreAfterFinish:true,afterSetup:function(C){C.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(C){C.element.undoClipping()}},arguments[1]||{}))};Effect.SwitchOff=function(B){B=$(B);var A=B.getInlineOpacity();return new Effect.Appear(B,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(C){new Effect.Scale(C.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(D){D.element.makePositioned().makeClipping()},afterFinishInternal:function(D){D.element.hide().undoClipping().undoPositioned().setStyle({opacity:A})}})}},arguments[1]||{}))};Effect.DropOut=function(B){B=$(B);var A={top:B.getStyle("top"),left:B.getStyle("left"),opacity:B.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(B,{x:0,y:100,sync:true}),new Effect.Opacity(B,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(C){C.effects[0].element.makePositioned()},afterFinishInternal:function(C){C.effects[0].element.hide().undoPositioned().setStyle(A)}},arguments[1]||{}))};Effect.Shake=function(D){D=$(D);var B=Object.extend({distance:20,duration:0.5},arguments[1]||{});var E=parseFloat(B.distance);var C=parseFloat(B.duration)/10;var A={top:D.getStyle("top"),left:D.getStyle("left")};return new Effect.Move(D,{x:E,y:0,duration:C,afterFinishInternal:function(F){new Effect.Move(F.element,{x:-E*2,y:0,duration:C*2,afterFinishInternal:function(G){new Effect.Move(G.element,{x:E*2,y:0,duration:C*2,afterFinishInternal:function(H){new Effect.Move(H.element,{x:-E*2,y:0,duration:C*2,afterFinishInternal:function(I){new Effect.Move(I.element,{x:E*2,y:0,duration:C*2,afterFinishInternal:function(J){new Effect.Move(J.element,{x:-E,y:0,duration:C,afterFinishInternal:function(K){K.element.undoPositioned().setStyle(A)}})}})}})}})}})}})};Effect.SlideDown=function(C){C=$(C).cleanWhitespace();var A=C.down().getStyle("bottom");var B=C.getDimensions();return new Effect.Scale(C,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:B.height,originalWidth:B.width},restoreAfterFinish:true,afterSetup:function(D){D.element.makePositioned();D.element.down().makePositioned();if(window.opera){D.element.setStyle({top:""})}D.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(D){D.element.down().setStyle({bottom:(D.dims[0]-D.element.clientHeight)+"px"})},afterFinishInternal:function(D){D.element.undoClipping().undoPositioned();D.element.down().undoPositioned().setStyle({bottom:A})}},arguments[1]||{}))};Effect.SlideUp=function(C){C=$(C).cleanWhitespace();var A=C.down().getStyle("bottom");var B=C.getDimensions();return new Effect.Scale(C,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:B.height,originalWidth:B.width},restoreAfterFinish:true,afterSetup:function(D){D.element.makePositioned();D.element.down().makePositioned();if(window.opera){D.element.setStyle({top:""})}D.element.makeClipping().show()},afterUpdateInternal:function(D){D.element.down().setStyle({bottom:(D.dims[0]-D.element.clientHeight)+"px"})},afterFinishInternal:function(D){D.element.hide().undoClipping().undoPositioned();D.element.down().undoPositioned().setStyle({bottom:A})}},arguments[1]||{}))};Effect.Squish=function(A){return new Effect.Scale(A,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(B){B.element.makeClipping()},afterFinishInternal:function(B){B.element.hide().undoClipping()}})};Effect.Grow=function(C){C=$(C);var B=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});var A={top:C.style.top,left:C.style.left,height:C.style.height,width:C.style.width,opacity:C.getInlineOpacity()};var G=C.getDimensions();var H,F;var E,D;switch(B.direction){case"top-left":H=F=E=D=0;break;case"top-right":H=G.width;F=D=0;E=-G.width;break;case"bottom-left":H=E=0;F=G.height;D=-G.height;break;case"bottom-right":H=G.width;F=G.height;E=-G.width;D=-G.height;break;case"center":H=G.width/2;F=G.height/2;E=-G.width/2;D=-G.height/2;break}return new Effect.Move(C,{x:H,y:F,duration:0.01,beforeSetup:function(I){I.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(I){new Effect.Parallel([new Effect.Opacity(I.element,{sync:true,to:1,from:0,transition:B.opacityTransition}),new Effect.Move(I.element,{x:E,y:D,sync:true,transition:B.moveTransition}),new Effect.Scale(I.element,100,{scaleMode:{originalHeight:G.height,originalWidth:G.width},sync:true,scaleFrom:window.opera?1:0,transition:B.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(J){J.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(J){J.effects[0].element.undoClipping().undoPositioned().setStyle(A)}},B))}})};Effect.Shrink=function(C){C=$(C);var B=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});var A={top:C.style.top,left:C.style.left,height:C.style.height,width:C.style.width,opacity:C.getInlineOpacity()};var F=C.getDimensions();var E,D;switch(B.direction){case"top-left":E=D=0;break;case"top-right":E=F.width;D=0;break;case"bottom-left":E=0;D=F.height;break;case"bottom-right":E=F.width;D=F.height;break;case"center":E=F.width/2;D=F.height/2;break}return new Effect.Parallel([new Effect.Opacity(C,{sync:true,to:0,from:1,transition:B.opacityTransition}),new Effect.Scale(C,window.opera?1:0,{sync:true,transition:B.scaleTransition,restoreAfterFinish:true}),new Effect.Move(C,{x:E,y:D,sync:true,transition:B.moveTransition})],Object.extend({beforeStartInternal:function(G){G.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(G){G.effects[0].element.hide().undoClipping().undoPositioned().setStyle(A)}},B))};Effect.Pulsate=function(C){C=$(C);var B=arguments[1]||{},A=C.getInlineOpacity(),E=B.transition||Effect.Transitions.linear,D=function(F){return 1-E((-Math.cos((F*(B.pulses||5)*2)*Math.PI)/2)+0.5)};return new Effect.Opacity(C,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(F){F.element.setStyle({opacity:A})}},B),{transition:D}))};Effect.Fold=function(B){B=$(B);var A={top:B.style.top,left:B.style.left,width:B.style.width,height:B.style.height};B.makeClipping();return new Effect.Scale(B,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(C){new Effect.Scale(B,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(D){D.element.hide().undoClipping().setStyle(A)}})}},arguments[1]||{}))};Effect.Morph=Class.create(Effect.Base,{initialize:function(C){this.element=$(C);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({style:{}},arguments[1]||{});if(!Object.isString(A.style)){this.style=$H(A.style)}else{if(A.style.include(":")){this.style=A.style.parseStyle()}else{this.element.addClassName(A.style);this.style=$H(this.element.getStyles());this.element.removeClassName(A.style);var B=this.element.getStyles();this.style=this.style.reject(function(D){return D.value==B[D.key]});A.afterFinishInternal=function(D){D.element.addClassName(D.options.style);D.transforms.each(function(E){D.element.style[E.style]=""})}}}this.start(A)},setup:function(){function A(B){if(!B||["rgba(0, 0, 0, 0)","transparent"].include(B)){B="#ffffff"}B=B.parseColor();return $R(0,2).map(function(C){return parseInt(B.slice(C*2+1,C*2+3),16)})}this.transforms=this.style.map(function(G){var F=G[0],E=G[1],D=null;if(E.parseColor("#zzzzzz")!="#zzzzzz"){E=E.parseColor();D="color"}else{if(F=="opacity"){E=parseFloat(E);if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}}else{if(Element.CSS_LENGTH.test(E)){var C=E.match(/^([\+\-]?[0-9\.]+)(.*)$/);E=parseFloat(C[1]);D=(C.length==3)?C[2]:null}}}var B=this.element.getStyle(F);return{style:F.camelize(),originalValue:D=="color"?A(B):parseFloat(B||0),targetValue:D=="color"?A(E):E,unit:D}}.bind(this)).reject(function(B){return((B.originalValue==B.targetValue)||(B.unit!="color"&&(isNaN(B.originalValue)||isNaN(B.targetValue))))})},update:function(A){var D={},B,C=this.transforms.length;while(C--){D[(B=this.transforms[C]).style]=B.unit=="color"?"#"+(Math.round(B.originalValue[0]+(B.targetValue[0]-B.originalValue[0])*A)).toColorPart()+(Math.round(B.originalValue[1]+(B.targetValue[1]-B.originalValue[1])*A)).toColorPart()+(Math.round(B.originalValue[2]+(B.targetValue[2]-B.originalValue[2])*A)).toColorPart():(B.originalValue+(B.targetValue-B.originalValue)*A).toFixed(3)+(B.unit===null?"":B.unit)}this.element.setStyle(D,true)}});Effect.Transform=Class.create({initialize:function(A){this.tracks=[];this.options=arguments[1]||{};this.addTracks(A)},addTracks:function(A){A.each(function(B){B=$H(B);var C=B.values().first();this.tracks.push($H({ids:B.keys().first(),effect:Effect.Morph,options:{style:C}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(A){var D=A.get("ids"),C=A.get("effect"),B=A.get("options");var E=[$(D)||$$(D)].flatten();return E.map(function(F){return new C(F,Object.extend({sync:true},B))})}).flatten(),this.options)}});Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;String.__parseStyleElement=document.createElement("div");String.prototype.parseStyle=function(){var B,A=$H();if(Prototype.Browser.WebKit){B=new Element("div",{style:this}).style}else{String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>';B=String.__parseStyleElement.childNodes[0].style}Element.CSS_PROPERTIES.each(function(C){if(B[C]){A.set(C,B[C])}});if(Prototype.Browser.IE&&this.include("opacity")){A.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1])}return A};if(document.defaultView&&document.defaultView.getComputedStyle){Element.getStyles=function(B){var A=document.defaultView.getComputedStyle($(B),null);return Element.CSS_PROPERTIES.inject({},function(C,D){C[D]=A[D];return C})}}else{Element.getStyles=function(B){B=$(B);var A=B.currentStyle,C;C=Element.CSS_PROPERTIES.inject({},function(D,E){D[E]=A[E];return D});if(!C.opacity){C.opacity=B.getOpacity()}return C}}Effect.Methods={morph:function(A,B){A=$(A);new Effect.Morph(A,Object.extend({style:B},arguments[2]||{}));return A},visualEffect:function(C,E,B){C=$(C);var D=E.dasherize().camelize(),A=D.charAt(0).toUpperCase()+D.substring(1);new Effect[A](C,B);return C},highlight:function(B,A){B=$(B);new Effect.Highlight(B,A);return B}};$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(A){Effect.Methods[A]=function(C,B){C=$(C);Effect[A.charAt(0).toUpperCase()+A.substring(1)](C,B);return C}});$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(A){Effect.Methods[A]=Element[A]});Element.addMethods(Effect.Methods);if(Object.isUndefined(Effect)){throw ("dragdrop.js requires including script.aculo.us' effects.js library")}var Droppables={drops:[],remove:function(A){this.drops=this.drops.reject(function(B){return B.element==$(A)})},add:function(B){B=$(B);var A=Object.extend({greedy:true,hoverclass:null,tree:false},arguments[1]||{});if(A.containment){A._containers=[];var C=A.containment;if(Object.isArray(C)){C.each(function(D){A._containers.push($(D))})}else{A._containers.push($(C))}}if(A.accept){A.accept=[A.accept].flatten()}Element.makePositioned(B);A.element=B;this.drops.push(A)},findDeepestChild:function(A){deepest=A[0];for(i=1;i<A.length;++i){if(Element.isParent(A[i].element,deepest.element)){deepest=A[i]}}return deepest},isContained:function(B,A){var C;if(A.tree){C=B.treeNode}else{C=B.parentNode}return A._containers.detect(function(D){return C==D})},isAffected:function(A,C,B){return((B.element!=C)&&((!B._containers)||this.isContained(C,B))&&((!B.accept)||(Element.classNames(C).detect(function(D){return B.accept.include(D)})))&&Position.within(B.element,A[0],A[1]))},deactivate:function(A){if(A.hoverclass){Element.removeClassName(A.element,A.hoverclass)}this.last_active=null},activate:function(A){if(A.hoverclass){Element.addClassName(A.element,A.hoverclass)}this.last_active=A},show:function(A,C){if(!this.drops.length){return }var B,D=[];this.drops.each(function(E){if(Droppables.isAffected(A,C,E)){D.push(E)}});if(D.length>0){B=Droppables.findDeepestChild(D)}if(this.last_active&&this.last_active!=B){this.deactivate(this.last_active)}if(B){Position.within(B.element,A[0],A[1]);if(B.onHover){B.onHover(C,B.element,Position.overlap(B.overlap,B.element))}if(B!=this.last_active){Droppables.activate(B)}}},fire:function(B,A){if(!this.last_active){return }Position.prepare();if(this.isAffected([Event.pointerX(B),Event.pointerY(B)],A,this.last_active)){if(this.last_active.onDrop){this.last_active.onDrop(A,this.last_active.element,B);return true}}},reset:function(){if(this.last_active){this.deactivate(this.last_active)}}};var Draggables={drags:[],observers:[],register:function(A){if(this.drags.length==0){this.eventMouseUp=this.endDrag.bindAsEventListener(this);this.eventMouseMove=this.updateDrag.bindAsEventListener(this);this.eventKeypress=this.keyPress.bindAsEventListener(this);Event.observe(document,"mouseup",this.eventMouseUp);Event.observe(document,"mousemove",this.eventMouseMove);Event.observe(document,"keypress",this.eventKeypress)}this.drags.push(A)},unregister:function(A){this.drags=this.drags.reject(function(B){return B==A});if(this.drags.length==0){Event.stopObserving(document,"mouseup",this.eventMouseUp);Event.stopObserving(document,"mousemove",this.eventMouseMove);Event.stopObserving(document,"keypress",this.eventKeypress)}},activate:function(A){if(A.options.delay){this._timeout=setTimeout(function(){Draggables._timeout=null;window.focus();Draggables.activeDraggable=A}.bind(this),A.options.delay)}else{window.focus();this.activeDraggable=A}},deactivate:function(){this.activeDraggable=null},updateDrag:function(A){if(!this.activeDraggable){return }var B=[Event.pointerX(A),Event.pointerY(A)];if(this._lastPointer&&(this._lastPointer.inspect()==B.inspect())){return }this._lastPointer=B;this.activeDraggable.updateDrag(A,B)},endDrag:function(A){if(this._timeout){clearTimeout(this._timeout);this._timeout=null}if(!this.activeDraggable){return }this._lastPointer=null;this.activeDraggable.endDrag(A);this.activeDraggable=null},keyPress:function(A){if(this.activeDraggable){this.activeDraggable.keyPress(A)}},addObserver:function(A){this.observers.push(A);this._cacheObserverCallbacks()},removeObserver:function(A){this.observers=this.observers.reject(function(B){return B.element==A});this._cacheObserverCallbacks()},notify:function(B,A,C){if(this[B+"Count"]>0){this.observers.each(function(D){if(D[B]){D[B](B,A,C)}})}if(A.options[B]){A.options[B](A,C)}},_cacheObserverCallbacks:function(){["onStart","onEnd","onDrag"].each(function(A){Draggables[A+"Count"]=Draggables.observers.select(function(B){return B[A]}).length})}};var Draggable=Class.create({initialize:function(B){var C={handle:false,reverteffect:function(F,E,D){var G=Math.sqrt(Math.abs(E^2)+Math.abs(D^2))*0.02;new Effect.Move(F,{x:-D,y:-E,duration:G,queue:{scope:"_draggable",position:"end"}})},endeffect:function(E){var D=Object.isNumber(E._opacity)?E._opacity:1;new Effect.Opacity(E,{duration:0.2,from:0.7,to:D,queue:{scope:"_draggable",position:"end"},afterFinish:function(){Draggable._dragging[E]=false}})},zindex:1000,revert:false,quiet:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,snap:false,delay:0};if(!arguments[1]||Object.isUndefined(arguments[1].endeffect)){Object.extend(C,{starteffect:function(D){D._opacity=Element.getOpacity(D);Draggable._dragging[D]=true;new Effect.Opacity(D,{duration:0.2,from:D._opacity,to:0.7})}})}var A=Object.extend(C,arguments[1]||{});this.element=$(B);if(A.handle&&Object.isString(A.handle)){this.handle=this.element.down("."+A.handle,0)}if(!this.handle){this.handle=$(A.handle)}if(!this.handle){this.handle=this.element}if(A.scroll&&!A.scroll.scrollTo&&!A.scroll.outerHTML){A.scroll=$(A.scroll);this._isScrollChild=Element.childOf(this.element,A.scroll)}Element.makePositioned(this.element);this.options=A;this.dragging=false;this.eventMouseDown=this.initDrag.bindAsEventListener(this);Event.observe(this.handle,"mousedown",this.eventMouseDown);Draggables.register(this)},destroy:function(){Event.stopObserving(this.handle,"mousedown",this.eventMouseDown);Draggables.unregister(this)},currentDelta:function(){return([parseInt(Element.getStyle(this.element,"left")||"0"),parseInt(Element.getStyle(this.element,"top")||"0")])},initDrag:function(A){if(!Object.isUndefined(Draggable._dragging[this.element])&&Draggable._dragging[this.element]){return }if(Event.isLeftClick(A)){var C=Event.element(A);if((tag_name=C.tagName.toUpperCase())&&(tag_name=="INPUT"||tag_name=="SELECT"||tag_name=="OPTION"||tag_name=="BUTTON"||tag_name=="TEXTAREA")){return }var B=[Event.pointerX(A),Event.pointerY(A)];var D=this.element.cumulativeOffset();this.offset=[0,1].map(function(E){return(B[E]-D[E])});Draggables.activate(this);Event.stop(A)}},startDrag:function(B){this.dragging=true;if(!this.delta){this.delta=this.currentDelta()}if(this.options.zindex){this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0);this.element.style.zIndex=this.options.zindex}if(this.options.ghosting){this._clone=this.element.cloneNode(true);this._originallyAbsolute=(this.element.getStyle("position")=="absolute");if(!this._originallyAbsolute){Position.absolutize(this.element)}this.element.parentNode.insertBefore(this._clone,this.element)}if(this.options.scroll){if(this.options.scroll==window){var A=this._getWindowScroll(this.options.scroll);this.originalScrollLeft=A.left;this.originalScrollTop=A.top}else{this.originalScrollLeft=this.options.scroll.scrollLeft;this.originalScrollTop=this.options.scroll.scrollTop}}Draggables.notify("onStart",this,B);if(this.options.starteffect){this.options.starteffect(this.element)}},updateDrag:function(event,pointer){if(!this.dragging){this.startDrag(event)}if(!this.options.quiet){Position.prepare();Droppables.show(pointer,this.element)}Draggables.notify("onDrag",this,event);this.draw(pointer);if(this.options.change){this.options.change(this)}if(this.options.scroll){this.stopScrolling();var p;if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){p=[left,top,left+width,top+height]}}else{p=Position.page(this.options.scroll);p[0]+=this.options.scroll.scrollLeft+Position.deltaX;p[1]+=this.options.scroll.scrollTop+Position.deltaY;p.push(p[0]+this.options.scroll.offsetWidth);p.push(p[1]+this.options.scroll.offsetHeight)}var speed=[0,0];if(pointer[0]<(p[0]+this.options.scrollSensitivity)){speed[0]=pointer[0]-(p[0]+this.options.scrollSensitivity)}if(pointer[1]<(p[1]+this.options.scrollSensitivity)){speed[1]=pointer[1]-(p[1]+this.options.scrollSensitivity)}if(pointer[0]>(p[2]-this.options.scrollSensitivity)){speed[0]=pointer[0]-(p[2]-this.options.scrollSensitivity)}if(pointer[1]>(p[3]-this.options.scrollSensitivity)){speed[1]=pointer[1]-(p[3]-this.options.scrollSensitivity)}this.startScrolling(speed)}if(Prototype.Browser.WebKit){window.scrollBy(0,0)}Event.stop(event)},finishDrag:function(B,E){this.dragging=false;if(this.options.quiet){Position.prepare();var D=[Event.pointerX(B),Event.pointerY(B)];Droppables.show(D,this.element)}if(this.options.ghosting){if(!this._originallyAbsolute){Position.relativize(this.element)}delete this._originallyAbsolute;Element.remove(this._clone);this._clone=null}var F=false;if(E){F=Droppables.fire(B,this.element);if(!F){F=false}}if(F&&this.options.onDropped){this.options.onDropped(this.element)}Draggables.notify("onEnd",this,B);var A=this.options.revert;if(A&&Object.isFunction(A)){A=A(this.element)}var C=this.currentDelta();if(A&&this.options.reverteffect){if(F==0||A!="failure"){this.options.reverteffect(this.element,C[1]-this.delta[1],C[0]-this.delta[0])}}else{this.delta=C}if(this.options.zindex){this.element.style.zIndex=this.originalZ}if(this.options.endeffect){this.options.endeffect(this.element)}Draggables.deactivate(this);Droppables.reset()},keyPress:function(A){if(A.keyCode!=Event.KEY_ESC){return }this.finishDrag(A,false);Event.stop(A)},endDrag:function(A){if(!this.dragging){return }this.stopScrolling();this.finishDrag(A,true);Event.stop(A)},draw:function(A){var F=this.element.cumulativeOffset();if(this.options.ghosting){var C=Position.realOffset(this.element);F[0]+=C[0]-Position.deltaX;F[1]+=C[1]-Position.deltaY}var E=this.currentDelta();F[0]-=E[0];F[1]-=E[1];if(this.options.scroll&&(this.options.scroll!=window&&this._isScrollChild)){F[0]-=this.options.scroll.scrollLeft-this.originalScrollLeft;F[1]-=this.options.scroll.scrollTop-this.originalScrollTop}var D=[0,1].map(function(G){return(A[G]-F[G]-this.offset[G])}.bind(this));if(this.options.snap){if(Object.isFunction(this.options.snap)){D=this.options.snap(D[0],D[1],this)}else{if(Object.isArray(this.options.snap)){D=D.map(function(G,H){return(G/this.options.snap[H]).round()*this.options.snap[H]}.bind(this))}else{D=D.map(function(G){return(G/this.options.snap).round()*this.options.snap}.bind(this))}}}var B=this.element.style;if((!this.options.constraint)||(this.options.constraint=="horizontal")){B.left=D[0]+"px"}if((!this.options.constraint)||(this.options.constraint=="vertical")){B.top=D[1]+"px"}if(B.visibility=="hidden"){B.visibility=""}},stopScrolling:function(){if(this.scrollInterval){clearInterval(this.scrollInterval);this.scrollInterval=null;Draggables._lastScrollPointer=null}},startScrolling:function(A){if(!(A[0]||A[1])){return }this.scrollSpeed=[A[0]*this.options.scrollSpeed,A[1]*this.options.scrollSpeed];this.lastScrolled=new Date();this.scrollInterval=setInterval(this.scroll.bind(this),10)},scroll:function(){var current=new Date();var delta=current-this.lastScrolled;this.lastScrolled=current;if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){if(this.scrollSpeed[0]||this.scrollSpeed[1]){var d=delta/1000;this.options.scroll.scrollTo(left+d*this.scrollSpeed[0],top+d*this.scrollSpeed[1])}}}else{this.options.scroll.scrollLeft+=this.scrollSpeed[0]*delta/1000;this.options.scroll.scrollTop+=this.scrollSpeed[1]*delta/1000}Position.prepare();Droppables.show(Draggables._lastPointer,this.element);Draggables.notify("onDrag",this);if(this._isScrollChild){Draggables._lastScrollPointer=Draggables._lastScrollPointer||$A(Draggables._lastPointer);Draggables._lastScrollPointer[0]+=this.scrollSpeed[0]*delta/1000;Draggables._lastScrollPointer[1]+=this.scrollSpeed[1]*delta/1000;if(Draggables._lastScrollPointer[0]<0){Draggables._lastScrollPointer[0]=0}if(Draggables._lastScrollPointer[1]<0){Draggables._lastScrollPointer[1]=0}this.draw(Draggables._lastScrollPointer)}if(this.options.change){this.options.change(this)}},_getWindowScroll:function(w){var T,L,W,H;with(w.document){if(w.document.documentElement&&documentElement.scrollTop){T=documentElement.scrollTop;L=documentElement.scrollLeft}else{if(w.document.body){T=body.scrollTop;L=body.scrollLeft}}if(w.innerWidth){W=w.innerWidth;H=w.innerHeight}else{if(w.document.documentElement&&documentElement.clientWidth){W=documentElement.clientWidth;H=documentElement.clientHeight}else{W=body.offsetWidth;H=body.offsetHeight}}}return{top:T,left:L,width:W,height:H}}});Draggable._dragging={};var SortableObserver=Class.create({initialize:function(B,A){this.element=$(B);this.observer=A;this.lastValue=Sortable.serialize(this.element)},onStart:function(){this.lastValue=Sortable.serialize(this.element)},onEnd:function(){Sortable.unmark();if(this.lastValue!=Sortable.serialize(this.element)){this.observer(this.element)}}});var Sortable={SERIALIZE_RULE:/^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,sortables:{},_findRootElement:function(A){while(A.tagName.toUpperCase()!="BODY"){if(A.id&&Sortable.sortables[A.id]){return A}A=A.parentNode}},options:function(A){A=Sortable._findRootElement($(A));if(!A){return }return Sortable.sortables[A.id]},destroy:function(A){A=$(A);var B=Sortable.sortables[A.id];if(B){Draggables.removeObserver(B.element);B.droppables.each(function(C){Droppables.remove(C)});B.draggables.invoke("destroy");delete Sortable.sortables[B.element.id]}},create:function(C){C=$(C);var B=Object.extend({element:C,tag:"li",dropOnEmpty:false,tree:false,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:C,handle:false,only:false,delay:0,hoverclass:null,ghosting:false,quiet:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,format:this.SERIALIZE_RULE,elements:false,handles:false,onChange:Prototype.emptyFunction,onUpdate:Prototype.emptyFunction},arguments[1]||{});this.destroy(C);var A={revert:true,quiet:B.quiet,scroll:B.scroll,scrollSpeed:B.scrollSpeed,scrollSensitivity:B.scrollSensitivity,delay:B.delay,ghosting:B.ghosting,constraint:B.constraint,handle:B.handle};if(B.starteffect){A.starteffect=B.starteffect}if(B.reverteffect){A.reverteffect=B.reverteffect}else{if(B.ghosting){A.reverteffect=function(F){F.style.top=0;F.style.left=0}}}if(B.endeffect){A.endeffect=B.endeffect}if(B.zindex){A.zindex=B.zindex}var D={overlap:B.overlap,containment:B.containment,tree:B.tree,hoverclass:B.hoverclass,onHover:Sortable.onHover};var E={onHover:Sortable.onEmptyHover,overlap:B.overlap,containment:B.containment,hoverclass:B.hoverclass};Element.cleanWhitespace(C);B.draggables=[];B.droppables=[];if(B.dropOnEmpty||B.tree){Droppables.add(C,E);B.droppables.push(C)}(B.elements||this.findElements(C,B)||[]).each(function(H,F){var G=B.handles?$(B.handles[F]):(B.handle?$(H).select("."+B.handle)[0]:H);B.draggables.push(new Draggable(H,Object.extend(A,{handle:G})));Droppables.add(H,D);if(B.tree){H.treeNode=C}B.droppables.push(H)});if(B.tree){(Sortable.findTreeElements(C,B)||[]).each(function(F){Droppables.add(F,E);F.treeNode=C;B.droppables.push(F)})}this.sortables[C.identify()]=B;Draggables.addObserver(new SortableObserver(C,B.onUpdate))},findElements:function(B,A){return Element.findChildren(B,A.only,A.tree?true:false,A.tag)},findTreeElements:function(B,A){return Element.findChildren(B,A.only,A.tree?true:false,A.treeTag)},onHover:function(E,D,A){if(Element.isParent(D,E)){return }if(A>0.33&&A<0.66&&Sortable.options(D).tree){return }else{if(A>0.5){Sortable.mark(D,"before");if(D.previousSibling!=E){var B=E.parentNode;E.style.visibility="hidden";D.parentNode.insertBefore(E,D);if(D.parentNode!=B){Sortable.options(B).onChange(E)}Sortable.options(D.parentNode).onChange(E)}}else{Sortable.mark(D,"after");var C=D.nextSibling||null;if(C!=E){var B=E.parentNode;E.style.visibility="hidden";D.parentNode.insertBefore(E,C);if(D.parentNode!=B){Sortable.options(B).onChange(E)}Sortable.options(D.parentNode).onChange(E)}}}},onEmptyHover:function(E,G,H){var I=E.parentNode;var A=Sortable.options(G);if(!Element.isParent(G,E)){var F;var C=Sortable.findElements(G,{tag:A.tag,only:A.only});var B=null;if(C){var D=Element.offsetSize(G,A.overlap)*(1-H);for(F=0;F<C.length;F+=1){if(D-Element.offsetSize(C[F],A.overlap)>=0){D-=Element.offsetSize(C[F],A.overlap)}else{if(D-(Element.offsetSize(C[F],A.overlap)/2)>=0){B=F+1<C.length?C[F+1]:null;break}else{B=C[F];break}}}}G.insertBefore(E,B);Sortable.options(I).onChange(E);A.onChange(E)}},unmark:function(){if(Sortable._marker){Sortable._marker.hide()}},mark:function(B,A){var D=Sortable.options(B.parentNode);if(D&&!D.ghosting){return }if(!Sortable._marker){Sortable._marker=($("dropmarker")||Element.extend(document.createElement("DIV"))).hide().addClassName("dropmarker").setStyle({position:"absolute"});document.getElementsByTagName("body").item(0).appendChild(Sortable._marker)}var C=B.cumulativeOffset();Sortable._marker.setStyle({left:C[0]+"px",top:C[1]+"px"});if(A=="after"){if(D.overlap=="horizontal"){Sortable._marker.setStyle({left:(C[0]+B.clientWidth)+"px"})}else{Sortable._marker.setStyle({top:(C[1]+B.clientHeight)+"px"})}}Sortable._marker.show()},_tree:function(E,B,F){var D=Sortable.findElements(E,B)||[];for(var C=0;C<D.length;++C){var A=D[C].id.match(B.format);if(!A){continue}var G={id:encodeURIComponent(A?A[1]:null),element:E,parent:F,children:[],position:F.children.length,container:$(D[C]).down(B.treeTag)};if(G.container){this._tree(G.container,B,G)}F.children.push(G)}return F},tree:function(D){D=$(D);var C=this.options(D);var B=Object.extend({tag:C.tag,treeTag:C.treeTag,only:C.only,name:D.id,format:C.format},arguments[1]||{});var A={id:null,parent:null,children:[],container:D,position:0};return Sortable._tree(D,B,A)},_constructIndex:function(B){var A="";do{if(B.id){A="["+B.position+"]"+A}}while((B=B.parent)!=null);return A},sequence:function(B){B=$(B);var A=Object.extend(this.options(B),arguments[1]||{});return $(this.findElements(B,A)||[]).map(function(C){return C.id.match(A.format)?C.id.match(A.format)[1]:""})},setSequence:function(B,C){B=$(B);var A=Object.extend(this.options(B),arguments[2]||{});var D={};this.findElements(B,A).each(function(E){if(E.id.match(A.format)){D[E.id.match(A.format)[1]]=[E,E.parentNode]}E.parentNode.removeChild(E)});C.each(function(E){var F=D[E];if(F){F[1].appendChild(F[0]);delete D[E]}})},serialize:function(C){C=$(C);var B=Object.extend(Sortable.options(C),arguments[1]||{});var A=encodeURIComponent((arguments[1]&&arguments[1].name)?arguments[1].name:C.id);if(B.tree){return Sortable.tree(C,arguments[1]).children.map(function(D){return[A+Sortable._constructIndex(D)+"[id]="+encodeURIComponent(D.id)].concat(D.children.map(arguments.callee))}).flatten().join("&")}else{return Sortable.sequence(C,arguments[1]).map(function(D){return A+"[]="+encodeURIComponent(D)}).join("&")}}};Element.isParent=function(B,A){if(!B.parentNode||B==A){return false}if(B.parentNode==A){return true}return Element.isParent(B.parentNode,A)};Element.findChildren=function(D,B,A,C){if(!D.hasChildNodes()){return null}C=C.toUpperCase();if(B){B=[B].flatten()}var E=[];$A(D.childNodes).each(function(G){if(G.tagName&&G.tagName.toUpperCase()==C&&(!B||(Element.classNames(G).detect(function(H){return B.include(H)})))){E.push(G)}if(A){var F=Element.findChildren(G,B,A,C);if(F){E.push(F)}}});return(E.length>0?E.flatten():[])};Element.offsetSize=function(A,B){return A["offset"+((B=="vertical"||B=="height")?"Height":"Width")]};if(typeof Effect=="undefined"){throw ("controls.js requires including script.aculo.us' effects.js library")}var Autocompleter={};Autocompleter.Base=Class.create({baseInitialize:function(B,C,A){B=$(B);this.element=B;this.update=$(C);this.hasFocus=false;this.changed=false;this.active=false;this.index=0;this.entryCount=0;this.oldElementValue=this.element.value;if(this.setOptions){this.setOptions(A)}else{this.options=A||{}}this.options.paramName=this.options.paramName||this.element.name;this.options.tokens=this.options.tokens||[];this.options.frequency=this.options.frequency||0.4;this.options.minChars=this.options.minChars||1;this.options.onShow=this.options.onShow||function(D,E){if(!E.style.position||E.style.position=="absolute"){E.style.position="absolute";Position.clone(D,E,{setHeight:false,offsetTop:D.offsetHeight})}Effect.Appear(E,{duration:0.15})};this.options.onHide=this.options.onHide||function(D,E){new Effect.Fade(E,{duration:0.15})};if(typeof (this.options.tokens)=="string"){this.options.tokens=new Array(this.options.tokens)}if(!this.options.tokens.include("\n")){this.options.tokens.push("\n")}this.observer=null;this.element.setAttribute("autocomplete","off");Element.hide(this.update);Event.observe(this.element,"blur",this.onBlur.bindAsEventListener(this));Event.observe(this.element,"keydown",this.onKeyPress.bindAsEventListener(this))},show:function(){if(Element.getStyle(this.update,"display")=="none"){this.options.onShow(this.element,this.update)}if(!this.iefix&&(Prototype.Browser.IE)&&(Element.getStyle(this.update,"position")=="absolute")){new Insertion.After(this.update,'<iframe id="'+this.update.id+'_iefix" style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" src="javascript:false;" frameborder="0" scrolling="no"></iframe>');this.iefix=$(this.update.id+"_iefix")}if(this.iefix){setTimeout(this.fixIEOverlapping.bind(this),50)}},fixIEOverlapping:function(){Position.clone(this.update,this.iefix,{setTop:(!this.update.style.height)});this.iefix.style.zIndex=1;this.update.style.zIndex=2;Element.show(this.iefix)},hide:function(){this.stopIndicator();if(Element.getStyle(this.update,"display")!="none"){this.options.onHide(this.element,this.update)}if(this.iefix){Element.hide(this.iefix)}},startIndicator:function(){if(this.options.indicator){Element.show(this.options.indicator)}},stopIndicator:function(){if(this.options.indicator){Element.hide(this.options.indicator)}},onKeyPress:function(A){if(this.active){switch(A.keyCode){case Event.KEY_TAB:case Event.KEY_RETURN:this.selectEntry();Event.stop(A);case Event.KEY_ESC:this.hide();this.active=false;Event.stop(A);return ;case Event.KEY_LEFT:case Event.KEY_RIGHT:return ;case Event.KEY_UP:this.markPrevious();this.render();Event.stop(A);return ;case Event.KEY_DOWN:this.markNext();this.render();Event.stop(A);return }}else{if(A.keyCode==Event.KEY_TAB||A.keyCode==Event.KEY_RETURN||(Prototype.Browser.WebKit>0&&A.keyCode==0)){return }}this.changed=true;this.hasFocus=true;if(this.observer){clearTimeout(this.observer)}this.observer=setTimeout(this.onObserverEvent.bind(this),this.options.frequency*1000)},activate:function(){this.changed=false;this.hasFocus=true;this.getUpdatedChoices()},onHover:function(B){var A=Event.findElement(B,"LI");if(this.index!=A.autocompleteIndex){this.index=A.autocompleteIndex;this.render()}Event.stop(B)},onClick:function(B){var A=Event.findElement(B,"LI");this.index=A.autocompleteIndex;this.selectEntry();this.hide()},onBlur:function(A){setTimeout(this.hide.bind(this),250);this.hasFocus=false;this.active=false},render:function(){if(this.entryCount>0){for(var A=0;A<this.entryCount;A++){this.index==A?Element.addClassName(this.getEntry(A),"selected"):Element.removeClassName(this.getEntry(A),"selected")}if(this.hasFocus){this.show();this.active=true}}else{this.active=false;this.hide()}},markPrevious:function(){if(this.index>0){this.index--}else{this.index=this.entryCount-1}this.getEntry(this.index).scrollIntoView(true)},markNext:function(){if(this.index<this.entryCount-1){this.index++}else{this.index=0}this.getEntry(this.index).scrollIntoView(false)},getEntry:function(A){return this.update.firstChild.childNodes[A]},getCurrentEntry:function(){return this.getEntry(this.index)},selectEntry:function(){this.active=false;this.updateElement(this.getCurrentEntry())},updateElement:function(F){if(this.options.updateElement){this.options.updateElement(F);return }var D="";if(this.options.select){var A=$(F).select("."+this.options.select)||[];if(A.length>0){D=Element.collectTextNodes(A[0],this.options.select)}}else{D=Element.collectTextNodesIgnoreClass(F,"informal")}var C=this.getTokenBounds();if(C[0]!=-1){var E=this.element.value.substr(0,C[0]);var B=this.element.value.substr(C[0]).match(/^\s+/);if(B){E+=B[0]}this.element.value=E+D+this.element.value.substr(C[1])}else{this.element.value=D}this.oldElementValue=this.element.value;this.element.focus();if(this.options.afterUpdateElement){this.options.afterUpdateElement(this.element,F)}},updateChoices:function(C){if(!this.changed&&this.hasFocus){this.update.innerHTML=C;Element.cleanWhitespace(this.update);Element.cleanWhitespace(this.update.down());if(this.update.firstChild&&this.update.down().childNodes){this.entryCount=this.update.down().childNodes.length;for(var A=0;A<this.entryCount;A++){var B=this.getEntry(A);B.autocompleteIndex=A;this.addObservers(B)}}else{this.entryCount=0}this.stopIndicator();this.index=0;if(this.entryCount==1&&this.options.autoSelect){this.selectEntry();this.hide()}else{this.render()}}},addObservers:function(A){Event.observe(A,"mouseover",this.onHover.bindAsEventListener(this));Event.observe(A,"click",this.onClick.bindAsEventListener(this))},onObserverEvent:function(){this.changed=false;this.tokenBounds=null;if(this.getToken().length>=this.options.minChars){this.getUpdatedChoices()}else{this.active=false;this.hide()}this.oldElementValue=this.element.value},getToken:function(){var A=this.getTokenBounds();return this.element.value.substring(A[0],A[1]).strip()},getTokenBounds:function(){if(null!=this.tokenBounds){return this.tokenBounds}var E=this.element.value;if(E.strip().empty()){return[-1,0]}var F=arguments.callee.getFirstDifferencePos(E,this.oldElementValue);var H=(F==this.oldElementValue.length?1:0);var D=-1,C=E.length;var G;for(var B=0,A=this.options.tokens.length;B<A;++B){G=E.lastIndexOf(this.options.tokens[B],F+H-1);if(G>D){D=G}G=E.indexOf(this.options.tokens[B],F+H);if(-1!=G&&G<C){C=G}}return(this.tokenBounds=[D+1,C])}});Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos=function(C,A){var D=Math.min(C.length,A.length);for(var B=0;B<D;++B){if(C[B]!=A[B]){return B}}return D};Ajax.Autocompleter=Class.create(Autocompleter.Base,{initialize:function(C,D,B,A){this.baseInitialize(C,D,A);this.options.asynchronous=true;this.options.onComplete=this.onComplete.bind(this);this.options.defaultParams=this.options.parameters||null;this.url=B},getUpdatedChoices:function(){this.startIndicator();var A=encodeURIComponent(this.options.paramName)+"="+encodeURIComponent(this.getToken());this.options.parameters=this.options.callback?this.options.callback(this.element,A):A;if(this.options.defaultParams){this.options.parameters+="&"+this.options.defaultParams}new Ajax.Request(this.url,this.options)},onComplete:function(A){this.updateChoices(A.responseText)}});Autocompleter.Local=Class.create(Autocompleter.Base,{initialize:function(B,D,C,A){this.baseInitialize(B,D,A);this.options.array=C},getUpdatedChoices:function(){this.updateChoices(this.options.selector(this))},setOptions:function(A){this.options=Object.extend({choices:10,partialSearch:true,partialChars:2,ignoreCase:true,fullSearch:false,selector:function(B){var D=[];var C=[];var H=B.getToken();var G=0;for(var E=0;E<B.options.array.length&&D.length<B.options.choices;E++){var F=B.options.array[E];var I=B.options.ignoreCase?F.toLowerCase().indexOf(H.toLowerCase()):F.indexOf(H);while(I!=-1){if(I==0&&F.length!=H.length){D.push("<li><strong>"+F.substr(0,H.length)+"</strong>"+F.substr(H.length)+"</li>");break}else{if(H.length>=B.options.partialChars&&B.options.partialSearch&&I!=-1){if(B.options.fullSearch||/\s/.test(F.substr(I-1,1))){C.push("<li>"+F.substr(0,I)+"<strong>"+F.substr(I,H.length)+"</strong>"+F.substr(I+H.length)+"</li>");break}}}I=B.options.ignoreCase?F.toLowerCase().indexOf(H.toLowerCase(),I+1):F.indexOf(H,I+1)}}if(C.length){D=D.concat(C.slice(0,B.options.choices-D.length))}return"<ul>"+D.join("")+"</ul>"}},A||{})}});Field.scrollFreeActivate=function(A){setTimeout(function(){Field.activate(A)},1)};Ajax.InPlaceEditor=Class.create({initialize:function(C,B,A){this.url=B;this.element=C=$(C);this.prepareOptions();this._controls={};arguments.callee.dealWithDeprecatedOptions(A);Object.extend(this.options,A||{});if(!this.options.formId&&this.element.id){this.options.formId=this.element.id+"-inplaceeditor";if($(this.options.formId)){this.options.formId=""}}if(this.options.externalControl){this.options.externalControl=$(this.options.externalControl)}if(!this.options.externalControl){this.options.externalControlOnly=false}this._originalBackground=this.element.getStyle("background-color")||"transparent";this.element.title=this.options.clickToEditText;this._boundCancelHandler=this.handleFormCancellation.bind(this);this._boundComplete=(this.options.onComplete||Prototype.emptyFunction).bind(this);this._boundFailureHandler=this.handleAJAXFailure.bind(this);this._boundSubmitHandler=this.handleFormSubmission.bind(this);this._boundWrapperHandler=this.wrapUp.bind(this);this.registerListeners()},checkForEscapeOrReturn:function(A){if(!this._editing||A.ctrlKey||A.altKey||A.shiftKey){return }if(Event.KEY_ESC==A.keyCode){this.handleFormCancellation(A)}else{if(Event.KEY_RETURN==A.keyCode){this.handleFormSubmission(A)}}},createControl:function(G,C,B){var E=this.options[G+"Control"];var F=this.options[G+"Text"];if("button"==E){var A=document.createElement("input");A.type="submit";A.value=F;A.className="editor_"+G+"_button";if("cancel"==G){A.onclick=this._boundCancelHandler}this._form.appendChild(A);this._controls[G]=A}else{if("link"==E){var D=document.createElement("a");D.href="#";D.appendChild(document.createTextNode(F));D.onclick="cancel"==G?this._boundCancelHandler:this._boundSubmitHandler;D.className="editor_"+G+"_link";if(B){D.className+=" "+B}this._form.appendChild(D);this._controls[G]=D}}},createEditField:function(){var C=(this.options.loadTextURL?this.options.loadingText:this.getText());var B;if(1>=this.options.rows&&!/\r|\n/.test(this.getText())){B=document.createElement("input");B.type="text";var A=this.options.size||this.options.cols||0;if(0<A){B.size=A}}else{B=document.createElement("textarea");B.rows=(1>=this.options.rows?this.options.autoRows:this.options.rows);B.cols=this.options.cols||40}B.name=this.options.paramName;B.value=C;B.className="editor_field";if(this.options.submitOnBlur){B.onblur=this._boundSubmitHandler}this._controls.editor=B;if(this.options.loadTextURL){this.loadExternalText()}this._form.appendChild(this._controls.editor)},createForm:function(){var B=this;function A(D,E){var C=B.options["text"+D+"Controls"];if(!C||E===false){return }B._form.appendChild(document.createTextNode(C))}this._form=$(document.createElement("form"));this._form.id=this.options.formId;this._form.addClassName(this.options.formClassName);this._form.onsubmit=this._boundSubmitHandler;this.createEditField();if("textarea"==this._controls.editor.tagName.toLowerCase()){this._form.appendChild(document.createElement("br"))}if(this.options.onFormCustomization){this.options.onFormCustomization(this,this._form)}A("Before",this.options.okControl||this.options.cancelControl);this.createControl("ok",this._boundSubmitHandler);A("Between",this.options.okControl&&this.options.cancelControl);this.createControl("cancel",this._boundCancelHandler,"editor_cancel");A("After",this.options.okControl||this.options.cancelControl)},destroy:function(){if(this._oldInnerHTML){this.element.innerHTML=this._oldInnerHTML}this.leaveEditMode();this.unregisterListeners()},enterEditMode:function(A){if(this._saving||this._editing){return }this._editing=true;this.triggerCallback("onEnterEditMode");if(this.options.externalControl){this.options.externalControl.hide()}this.element.hide();this.createForm();this.element.parentNode.insertBefore(this._form,this.element);if(!this.options.loadTextURL){this.postProcessEditField()}if(A){Event.stop(A)}},enterHover:function(A){if(this.options.hoverClassName){this.element.addClassName(this.options.hoverClassName)}if(this._saving){return }this.triggerCallback("onEnterHover")},getText:function(){return this.element.innerHTML.unescapeHTML()},handleAJAXFailure:function(A){this.triggerCallback("onFailure",A);if(this._oldInnerHTML){this.element.innerHTML=this._oldInnerHTML;this._oldInnerHTML=null}},handleFormCancellation:function(A){this.wrapUp();if(A){Event.stop(A)}},handleFormSubmission:function(D){var B=this._form;var C=$F(this._controls.editor);this.prepareSubmission();var E=this.options.callback(B,C)||"";if(Object.isString(E)){E=E.toQueryParams()}E.editorId=this.element.id;if(this.options.htmlResponse){var A=Object.extend({evalScripts:true},this.options.ajaxOptions);Object.extend(A,{parameters:E,onComplete:this._boundWrapperHandler,onFailure:this._boundFailureHandler});new Ajax.Updater({success:this.element},this.url,A)}else{var A=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(A,{parameters:E,onComplete:this._boundWrapperHandler,onFailure:this._boundFailureHandler});new Ajax.Request(this.url,A)}if(D){Event.stop(D)}},leaveEditMode:function(){this.element.removeClassName(this.options.savingClassName);this.removeForm();this.leaveHover();this.element.style.backgroundColor=this._originalBackground;this.element.show();if(this.options.externalControl){this.options.externalControl.show()}this._saving=false;this._editing=false;this._oldInnerHTML=null;this.triggerCallback("onLeaveEditMode")},leaveHover:function(A){if(this.options.hoverClassName){this.element.removeClassName(this.options.hoverClassName)}if(this._saving){return }this.triggerCallback("onLeaveHover")},loadExternalText:function(){this._form.addClassName(this.options.loadingClassName);this._controls.editor.disabled=true;var A=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(A,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(C){this._form.removeClassName(this.options.loadingClassName);var B=C.responseText;if(this.options.stripLoadedTextTags){B=B.stripTags()}this._controls.editor.value=B;this._controls.editor.disabled=false;this.postProcessEditField()}.bind(this),onFailure:this._boundFailureHandler});new Ajax.Request(this.options.loadTextURL,A)},postProcessEditField:function(){var A=this.options.fieldPostCreation;if(A){$(this._controls.editor)["focus"==A?"focus":"activate"]()}},prepareOptions:function(){this.options=Object.clone(Ajax.InPlaceEditor.DefaultOptions);Object.extend(this.options,Ajax.InPlaceEditor.DefaultCallbacks);[this._extraDefaultOptions].flatten().compact().each(function(A){Object.extend(this.options,A)}.bind(this))},prepareSubmission:function(){this._saving=true;this.removeForm();this.leaveHover();this.showSaving()},registerListeners:function(){this._listeners={};var A;$H(Ajax.InPlaceEditor.Listeners).each(function(B){A=this[B.value].bind(this);this._listeners[B.key]=A;if(!this.options.externalControlOnly){this.element.observe(B.key,A)}if(this.options.externalControl){this.options.externalControl.observe(B.key,A)}}.bind(this))},removeForm:function(){if(!this._form){return }this._form.remove();this._form=null;this._controls={}},showSaving:function(){this._oldInnerHTML=this.element.innerHTML;this.element.innerHTML=this.options.savingText;this.element.addClassName(this.options.savingClassName);this.element.style.backgroundColor=this._originalBackground;this.element.show()},triggerCallback:function(B,A){if("function"==typeof this.options[B]){this.options[B](this,A)}},unregisterListeners:function(){$H(this._listeners).each(function(A){if(!this.options.externalControlOnly){this.element.stopObserving(A.key,A.value)}if(this.options.externalControl){this.options.externalControl.stopObserving(A.key,A.value)}}.bind(this))},wrapUp:function(A){this.leaveEditMode();this._boundComplete(A,this.element)}});Object.extend(Ajax.InPlaceEditor.prototype,{dispose:Ajax.InPlaceEditor.prototype.destroy});Ajax.InPlaceCollectionEditor=Class.create(Ajax.InPlaceEditor,{initialize:function($super,C,B,A){this._extraDefaultOptions=Ajax.InPlaceCollectionEditor.DefaultOptions;$super(C,B,A)},createEditField:function(){var A=document.createElement("select");A.name=this.options.paramName;A.size=1;this._controls.editor=A;this._collection=this.options.collection||[];if(this.options.loadCollectionURL){this.loadCollection()}else{this.checkForExternalText()}this._form.appendChild(this._controls.editor)},loadCollection:function(){this._form.addClassName(this.options.loadingClassName);this.showLoadingText(this.options.loadingCollectionText);var options=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(options,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(transport){var js=transport.responseText.strip();if(!/^\[.*\]$/.test(js)){throw ("Server returned an invalid collection representation.")}this._collection=eval(js);this.checkForExternalText()}.bind(this),onFailure:this.onFailure});new Ajax.Request(this.options.loadCollectionURL,options)},showLoadingText:function(B){this._controls.editor.disabled=true;var A=this._controls.editor.firstChild;if(!A){A=document.createElement("option");A.value="";this._controls.editor.appendChild(A);A.selected=true}A.update((B||"").stripScripts().stripTags())},checkForExternalText:function(){this._text=this.getText();if(this.options.loadTextURL){this.loadExternalText()}else{this.buildOptionList()}},loadExternalText:function(){this.showLoadingText(this.options.loadingText);var A=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(A,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(B){this._text=B.responseText.strip();this.buildOptionList()}.bind(this),onFailure:this.onFailure});new Ajax.Request(this.options.loadTextURL,A)},buildOptionList:function(){this._form.removeClassName(this.options.loadingClassName);this._collection=this._collection.map(function(D){return 2===D.length?D:[D,D].flatten()});var B=("value" in this.options)?this.options.value:this._text;var A=this._collection.any(function(D){return D[0]==B}.bind(this));this._controls.editor.update("");var C;this._collection.each(function(E,D){C=document.createElement("option");C.value=E[0];C.selected=A?E[0]==B:0==D;C.appendChild(document.createTextNode(E[1]));this._controls.editor.appendChild(C)}.bind(this));this._controls.editor.disabled=false;Field.scrollFreeActivate(this._controls.editor)}});Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions=function(A){if(!A){return }function B(C,D){if(C in A||D===undefined){return }A[C]=D}B("cancelControl",(A.cancelLink?"link":(A.cancelButton?"button":A.cancelLink==A.cancelButton==false?false:undefined)));B("okControl",(A.okLink?"link":(A.okButton?"button":A.okLink==A.okButton==false?false:undefined)));B("highlightColor",A.highlightcolor);B("highlightEndColor",A.highlightendcolor)};Object.extend(Ajax.InPlaceEditor,{DefaultOptions:{ajaxOptions:{},autoRows:3,cancelControl:"link",cancelText:"cancel",clickToEditText:"Click to edit",externalControl:null,externalControlOnly:false,fieldPostCreation:"activate",formClassName:"inplaceeditor-form",formId:null,highlightColor:"#ffff99",highlightEndColor:"#ffffff",hoverClassName:"",htmlResponse:true,loadingClassName:"inplaceeditor-loading",loadingText:"Loading...",okControl:"button",okText:"ok",paramName:"value",rows:1,savingClassName:"inplaceeditor-saving",savingText:"Saving...",size:0,stripLoadedTextTags:false,submitOnBlur:false,textAfterControls:"",textBeforeControls:"",textBetweenControls:""},DefaultCallbacks:{callback:function(A){return Form.serialize(A)},onComplete:function(B,A){new Effect.Highlight(A,{startcolor:this.options.highlightColor,keepBackgroundImage:true})},onEnterEditMode:null,onEnterHover:function(A){A.element.style.backgroundColor=A.options.highlightColor;if(A._effect){A._effect.cancel()}},onFailure:function(B,A){alert("Error communication with the server: "+B.responseText.stripTags())},onFormCustomization:null,onLeaveEditMode:null,onLeaveHover:function(A){A._effect=new Effect.Highlight(A.element,{startcolor:A.options.highlightColor,endcolor:A.options.highlightEndColor,restorecolor:A._originalBackground,keepBackgroundImage:true})}},Listeners:{click:"enterEditMode",keydown:"checkForEscapeOrReturn",mouseover:"enterHover",mouseout:"leaveHover"}});Ajax.InPlaceCollectionEditor.DefaultOptions={loadingCollectionText:"Loading options..."};Form.Element.DelayedObserver=Class.create({initialize:function(B,A,C){this.delay=A||0.5;this.element=$(B);this.callback=C;this.timer=null;this.lastValue=$F(this.element);Event.observe(this.element,"keyup",this.delayedListener.bindAsEventListener(this))},delayedListener:function(A){if(this.lastValue==$F(this.element)){return }if(this.timer){clearTimeout(this.timer)}this.timer=setTimeout(this.onTimerEvent.bind(this),this.delay*1000);this.lastValue=$F(this.element)},onTimerEvent:function(){this.timer=null;this.callback(this.element,$F(this.element))}});if(!Control){var Control={}}Control.Slider=Class.create({initialize:function(D,A,B){var C=this;if(Object.isArray(D)){this.handles=D.collect(function(E){return $(E)})}else{this.handles=[$(D)]}this.track=$(A);this.options=B||{};this.axis=this.options.axis||"horizontal";this.increment=this.options.increment||1;this.step=parseInt(this.options.step||"1");this.range=this.options.range||$R(0,1);this.value=0;this.values=this.handles.map(function(){return 0});this.spans=this.options.spans?this.options.spans.map(function(E){return $(E)}):false;this.options.startSpan=$(this.options.startSpan||null);this.options.endSpan=$(this.options.endSpan||null);this.restricted=this.options.restricted||false;this.maximum=this.options.maximum||this.range.end;this.minimum=this.options.minimum||this.range.start;this.alignX=parseInt(this.options.alignX||"0");this.alignY=parseInt(this.options.alignY||"0");this.trackLength=this.maximumOffset()-this.minimumOffset();this.handleLength=this.isVertical()?(this.handles[0].offsetHeight!=0?this.handles[0].offsetHeight:this.handles[0].style.height.replace(/px$/,"")):(this.handles[0].offsetWidth!=0?this.handles[0].offsetWidth:this.handles[0].style.width.replace(/px$/,""));this.active=false;this.dragging=false;this.disabled=false;if(this.options.disabled){this.setDisabled()}this.allowedValues=this.options.values?this.options.values.sortBy(Prototype.K):false;if(this.allowedValues){this.minimum=this.allowedValues.min();this.maximum=this.allowedValues.max()}this.eventMouseDown=this.startDrag.bindAsEventListener(this);this.eventMouseUp=this.endDrag.bindAsEventListener(this);this.eventMouseMove=this.update.bindAsEventListener(this);this.handles.each(function(F,E){E=C.handles.length-1-E;C.setValue(parseFloat((Object.isArray(C.options.sliderValue)?C.options.sliderValue[E]:C.options.sliderValue)||C.range.start),E);F.makePositioned().observe("mousedown",C.eventMouseDown)});this.track.observe("mousedown",this.eventMouseDown);document.observe("mouseup",this.eventMouseUp);document.observe("mousemove",this.eventMouseMove);this.initialized=true},dispose:function(){var A=this;Event.stopObserving(this.track,"mousedown",this.eventMouseDown);Event.stopObserving(document,"mouseup",this.eventMouseUp);Event.stopObserving(document,"mousemove",this.eventMouseMove);this.handles.each(function(B){Event.stopObserving(B,"mousedown",A.eventMouseDown)})},setDisabled:function(){this.disabled=true},setEnabled:function(){this.disabled=false},getNearestValue:function(A){if(this.allowedValues){if(A>=this.allowedValues.max()){return(this.allowedValues.max())}if(A<=this.allowedValues.min()){return(this.allowedValues.min())}var C=Math.abs(this.allowedValues[0]-A);var B=this.allowedValues[0];this.allowedValues.each(function(D){var E=Math.abs(D-A);if(E<=C){B=D;C=E}});return B}if(A>this.range.end){return this.range.end}if(A<this.range.start){return this.range.start}return A},setValue:function(B,A){if(!this.active){this.activeHandleIdx=A||0;this.activeHandle=this.handles[this.activeHandleIdx];this.updateStyles()}A=A||this.activeHandleIdx||0;if(this.initialized&&this.restricted){if((A>0)&&(B<this.values[A-1])){B=this.values[A-1]}if((A<(this.handles.length-1))&&(B>this.values[A+1])){B=this.values[A+1]}}B=this.getNearestValue(B);this.values[A]=B;this.value=this.values[0];this.handles[A].style[this.isVertical()?"top":"left"]=this.translateToPx(B);this.drawSpans();if(!this.dragging||!this.event){this.updateFinished()}},setValueBy:function(B,A){this.setValue(this.values[A||this.activeHandleIdx||0]+B,A||this.activeHandleIdx||0)},translateToPx:function(A){return Math.round(((this.trackLength-this.handleLength)/(this.range.end-this.range.start))*(A-this.range.start))+"px"},translateToValue:function(A){return((A/(this.trackLength-this.handleLength)*(this.range.end-this.range.start))+this.range.start)},getRange:function(B){var A=this.values.sortBy(Prototype.K);B=B||0;return $R(A[B],A[B+1])},minimumOffset:function(){return(this.isVertical()?this.alignY:this.alignX)},maximumOffset:function(){return(this.isVertical()?(this.track.offsetHeight!=0?this.track.offsetHeight:this.track.style.height.replace(/px$/,""))-this.alignY:(this.track.offsetWidth!=0?this.track.offsetWidth:this.track.style.width.replace(/px$/,""))-this.alignX)},isVertical:function(){return(this.axis=="vertical")},drawSpans:function(){var A=this;if(this.spans){$R(0,this.spans.length-1).each(function(B){A.setSpan(A.spans[B],A.getRange(B))})}if(this.options.startSpan){this.setSpan(this.options.startSpan,$R(0,this.values.length>1?this.getRange(0).min():this.value))}if(this.options.endSpan){this.setSpan(this.options.endSpan,$R(this.values.length>1?this.getRange(this.spans.length-1).max():this.value,this.maximum))}},setSpan:function(B,A){if(this.isVertical()){B.style.top=this.translateToPx(A.start);B.style.height=this.translateToPx(A.end-A.start+this.range.start)}else{B.style.left=this.translateToPx(A.start);B.style.width=this.translateToPx(A.end-A.start+this.range.start)}},updateStyles:function(){this.handles.each(function(A){Element.removeClassName(A,"selected")});Element.addClassName(this.activeHandle,"selected")},startDrag:function(C){if(Event.isLeftClick(C)){if(!this.disabled){this.active=true;var D=Event.element(C);var E=[Event.pointerX(C),Event.pointerY(C)];var A=D;if(A==this.track){var B=this.track.cumulativeOffset();this.event=C;this.setValue(this.translateToValue((this.isVertical()?E[1]-B[1]:E[0]-B[0])-(this.handleLength/2)));var B=this.activeHandle.cumulativeOffset();this.offsetX=(E[0]-B[0]);this.offsetY=(E[1]-B[1])}else{while((this.handles.indexOf(D)==-1)&&D.parentNode){D=D.parentNode}if(this.handles.indexOf(D)!=-1){this.activeHandle=D;this.activeHandleIdx=this.handles.indexOf(this.activeHandle);this.updateStyles();var B=this.activeHandle.cumulativeOffset();this.offsetX=(E[0]-B[0]);this.offsetY=(E[1]-B[1])}}}Event.stop(C)}},update:function(A){if(this.active){if(!this.dragging){this.dragging=true}this.draw(A);if(Prototype.Browser.WebKit){window.scrollBy(0,0)}Event.stop(A)}},draw:function(B){var C=[Event.pointerX(B),Event.pointerY(B)];var A=this.track.cumulativeOffset();C[0]-=this.offsetX+A[0];C[1]-=this.offsetY+A[1];this.event=B;this.setValue(this.translateToValue(this.isVertical()?C[1]:C[0]));if(this.initialized&&this.options.onSlide){this.options.onSlide(this.values.length>1?this.values:this.value,this)}},endDrag:function(A){if(this.active&&this.dragging){this.finishDrag(A,true);Event.stop(A)}this.active=false;this.dragging=false},finishDrag:function(A,B){this.active=false;this.dragging=false;this.updateFinished()},updateFinished:function(){if(this.initialized&&this.options.onChange){this.options.onChange(this.values.length>1?this.values:this.value,this)}this.event=null}});Sound={tracks:{},_enabled:true,template:new Template('<embed style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>'),enable:function(){Sound._enabled=true},disable:function(){Sound._enabled=false},play:function(B){if(!Sound._enabled){return }var A=Object.extend({track:"global",url:B,replace:false},arguments[1]||{});if(A.replace&&this.tracks[A.track]){$R(0,this.tracks[A.track].id).each(function(D){var C=$("sound_"+A.track+"_"+D);C.Stop&&C.Stop();C.remove()});this.tracks[A.track]=null}if(!this.tracks[A.track]){this.tracks[A.track]={id:0}}else{this.tracks[A.track].id++}A.id=this.tracks[A.track].id;$$("body")[0].insert(Prototype.Browser.IE?new Element("bgsound",{id:"sound_"+A.track+"_"+A.id,src:A.url,loop:1,autostart:true}):Sound.template.evaluate(A))}};if(Prototype.Browser.Gecko&&navigator.userAgent.indexOf("Win")>0){if(navigator.plugins&&$A(navigator.plugins).detect(function(A){return A.name.indexOf("QuickTime")!=-1})){Sound.template=new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>')}else{if(navigator.plugins&&$A(navigator.plugins).detect(function(A){return A.name.indexOf("Windows Media")!=-1})){Sound.template=new Template('<object id="sound_#{track}_#{id}" type="application/x-mplayer2" data="#{url}"></object>')}else{if(navigator.plugins&&$A(navigator.plugins).detect(function(A){return A.name.indexOf("RealPlayer")!=-1})){Sound.template=new Template('<embed type="audio/x-pn-realaudio-plugin" style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>')}else{Sound.play=function(){}}}}};/* protoload 0.1 beta by Andreas Kalsch
 * last change: 09.07.2007
 *
 * This simple piece of code automates the creating of Ajax loading symbols.
 * The loading symbol covers an HTML element with correct position and size - example:
 * $('myElement').startWaiting() and $('myElement').stopWaiting()
 */
 
Protoload = {
	// the script to wait this amount of msecs until it shows the loading element
	timeUntilShow: 250,
	
	// opacity of loading element
	opacity: 0.6,
	
	// mike: definir z-index de la capa sombreada
	zIndex: 1000,

	// Start waiting status - show loading element
	startWaiting: function(element, className, timeUntilShow) {
		if (typeof element == 'string')
			element = document.getElementById(element);
		if (className == undefined)
			className = 'waiting';
		if (timeUntilShow == undefined)
			timeUntilShow = Protoload.timeUntilShow;
		
		element._waiting = true;
		if (!element._loading) {
			var e = document.createElement('div');
			(element.offsetParent || document.body).appendChild(element._loading = e);
			e.style.position = 'absolute';
			try {e.style.opacity = Protoload.opacity;} catch(e) {}
			try {e.style.MozOpacity = Protoload.opacity;} catch(e) {}
			try {e.style.filter = 'alpha(opacity='+Math.round(Protoload.opacity * 100)+')';} catch(e) {}
			try {e.style.KhtmlOpacity = Protoload.opacity;} catch(e) {}
			
			// mike: agregado para ponerse encima de otros elementos flotantes
			e.style.zIndex = Protoload.zIndex;
			
			/*var zIndex = 0;
			if (window.UI)
				if (UI.zIndex)
					zIndex = ++UI.zIndex;
			if (!zIndex)
				zIndex = ++Protoload._zIndex;
			e.style.zIndex = zIndex;*/
		}
		element._loading.className = className;
		window.setTimeout((function() {
			if (this._waiting) {
				var left = this.offsetLeft, 
					top = this.offsetTop,
					width = this.offsetWidth,
					height = this.offsetHeight,
					l = this._loading;
					
				l.style.left = left+'px';
				l.style.top = top+'px';
				l.style.width = width+'px';
				l.style.height = height+'px';
				l.style.display = 'inline';
			}
		}).bind(element), timeUntilShow);
	},
	
	// Stop waiting status - hide loading element
	stopWaiting: function(element) {
		if (element._waiting) {
			element._waiting = false;
			element._loading.parentNode.removeChild(element._loading);
			element._loading = null;
		}
	}/*,
	
	_zIndex: 1000000*/
};

if (Prototype) {
	Element.addMethods(Protoload);
	Object.extend(Element, Protoload);
}
/* */// @codingStandardsIgnoreFile
/*
 * Copyright (c) 2009 Simo Kinnunen.
 * Licensed under the MIT license.
 *
 * @version 1.09
 */
var Cufon=(function(){var m=function(){return m.replace.apply(null,arguments)};var x=m.DOM={ready:(function(){var C=false,E={loaded:1,complete:1};var B=[],D=function(){if(C){return}C=true;for(var F;F=B.shift();F()){}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",D,false);window.addEventListener("pageshow",D,false)}if(!window.opera&&document.readyState){(function(){E[document.readyState]?D():setTimeout(arguments.callee,10)})()}if(document.readyState&&document.createStyleSheet){(function(){try{document.body.doScroll("left");D()}catch(F){setTimeout(arguments.callee,1)}})()}q(window,"load",D);return function(F){if(!arguments.length){D()}else{C?F():B.push(F)}}})(),root:function(){return document.documentElement||document.body}};var n=m.CSS={Size:function(C,B){this.value=parseFloat(C);this.unit=String(C).match(/[a-z%]*$/)[0]||"px";this.convert=function(D){return D/B*this.value};this.convertFrom=function(D){return D/this.value*B};this.toString=function(){return this.value+this.unit}},addClass:function(C,B){var D=C.className;C.className=D+(D&&" ")+B;return C},color:j(function(C){var B={};B.color=C.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function(E,D,F){B.opacity=parseFloat(F);return"rgb("+D+")"});return B}),fontStretch:j(function(B){if(typeof B=="number"){return B}if(/%$/.test(B)){return parseFloat(B)/100}return{"ultra-condensed":0.5,"extra-condensed":0.625,condensed:0.75,"semi-condensed":0.875,"semi-expanded":1.125,expanded:1.25,"extra-expanded":1.5,"ultra-expanded":2}[B]||1}),getStyle:function(C){var B=document.defaultView;if(B&&B.getComputedStyle){return new a(B.getComputedStyle(C,null))}if(C.currentStyle){return new a(C.currentStyle)}return new a(C.style)},gradient:j(function(F){var G={id:F,type:F.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},C=F.substr(F.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);for(var E=0,B=C.length,D;E<B;++E){D=C[E].split("=",2).reverse();G.stops.push([D[1]||E/(B-1),D[0]])}return G}),quotedList:j(function(E){var D=[],C=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,B;while(B=C.exec(E)){D.push(B[3]||B[1])}return D}),recognizesMedia:j(function(G){var E=document.createElement("style"),D,C,B;E.type="text/css";E.media=G;try{E.appendChild(document.createTextNode("/**/"))}catch(F){}C=g("head")[0];C.insertBefore(E,C.firstChild);D=(E.sheet||E.styleSheet);B=D&&!D.disabled;C.removeChild(E);return B}),removeClass:function(D,C){var B=RegExp("(?:^|\\s+)"+C+"(?=\\s|$)","g");D.className=D.className.replace(B,"");return D},supports:function(D,C){var B=document.createElement("span").style;if(B[D]===undefined){return false}B[D]=C;return B[D]===C},textAlign:function(E,D,B,C){if(D.get("textAlign")=="right"){if(B>0){E=" "+E}}else{if(B<C-1){E+=" "}}return E},textShadow:j(function(F){if(F=="none"){return null}var E=[],G={},B,C=0;var D=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(B=D.exec(F)){if(B[0]==","){E.push(G);G={};C=0}else{if(B[1]){G.color=B[1]}else{G[["offX","offY","blur"][C++]]=B[2]}}}E.push(G);return E}),textTransform:(function(){var B={uppercase:function(C){return C.toUpperCase()},lowercase:function(C){return C.toLowerCase()},capitalize:function(C){return C.replace(/\b./g,function(D){return D.toUpperCase()})}};return function(E,D){var C=B[D.get("textTransform")];return C?C(E):E}})(),whiteSpace:(function(){var D={inline:1,"inline-block":1,"run-in":1};var C=/^\s+/,B=/\s+$/;return function(H,F,G,E){if(E){if(E.nodeName.toLowerCase()=="br"){H=H.replace(C,"")}}if(D[F.get("display")]){return H}if(!G.previousSibling){H=H.replace(C,"")}if(!G.nextSibling){H=H.replace(B,"")}return H}})()};n.ready=(function(){var B=!n.recognizesMedia("all"),E=false;var D=[],H=function(){B=true;for(var K;K=D.shift();K()){}};var I=g("link"),J=g("style");function C(K){return K.disabled||G(K.sheet,K.media||"screen")}function G(M,P){if(!n.recognizesMedia(P||"all")){return true}if(!M||M.disabled){return false}try{var Q=M.cssRules,O;if(Q){search:for(var L=0,K=Q.length;O=Q[L],L<K;++L){switch(O.type){case 2:break;case 3:if(!G(O.styleSheet,O.media.mediaText)){return false}break;default:break search}}}}catch(N){}return true}function F(){if(document.createStyleSheet){return true}var L,K;for(K=0;L=I[K];++K){if(L.rel.toLowerCase()=="stylesheet"&&!C(L)){return false}}for(K=0;L=J[K];++K){if(!C(L)){return false}}return true}x.ready(function(){if(!E){E=n.getStyle(document.body).isUsable()}if(B||(E&&F())){H()}else{setTimeout(arguments.callee,10)}});return function(K){if(B){K()}else{D.push(K)}}})();function s(D){var C=this.face=D.face,B={"\u0020":1,"\u00a0":1,"\u3000":1};this.glyphs=D.glyphs;this.w=D.w;this.baseSize=parseInt(C["units-per-em"],10);this.family=C["font-family"].toLowerCase();this.weight=C["font-weight"];this.style=C["font-style"]||"normal";this.viewBox=(function(){var F=C.bbox.split(/\s+/);var E={minX:parseInt(F[0],10),minY:parseInt(F[1],10),maxX:parseInt(F[2],10),maxY:parseInt(F[3],10)};E.width=E.maxX-E.minX;E.height=E.maxY-E.minY;E.toString=function(){return[this.minX,this.minY,this.width,this.height].join(" ")};return E})();this.ascent=-parseInt(C.ascent,10);this.descent=-parseInt(C.descent,10);this.height=-this.ascent+this.descent;this.spacing=function(L,N,E){var O=this.glyphs,M,K,G,P=[],F=0,J=-1,I=-1,H;while(H=L[++J]){M=O[H]||this.missingGlyph;if(!M){continue}if(K){F-=G=K[H]||0;P[I]-=G}F+=P[++I]=~~(M.w||this.w)+N+(B[H]?E:0);K=M.k}P.total=F;return P}}function f(){var C={},B={oblique:"italic",italic:"oblique"};this.add=function(D){(C[D.style]||(C[D.style]={}))[D.weight]=D};this.get=function(H,I){var G=C[H]||C[B[H]]||C.normal||C.italic||C.oblique;if(!G){return null}I={normal:400,bold:700}[I]||parseInt(I,10);if(G[I]){return G[I]}var E={1:1,99:0}[I%100],K=[],F,D;if(E===undefined){E=I>400}if(I==500){I=400}for(var J in G){if(!k(G,J)){continue}J=parseInt(J,10);if(!F||J<F){F=J}if(!D||J>D){D=J}K.push(J)}if(I<F){I=F}if(I>D){I=D}K.sort(function(M,L){return(E?(M>=I&&L>=I)?M<L:M>L:(M<=I&&L<=I)?M>L:M<L)?-1:1});return G[K[0]]}}function r(){function D(F,G){if(F.contains){return F.contains(G)}return F.compareDocumentPosition(G)&16}function B(G){var F=G.relatedTarget;if(!F||D(this,F)){return}C(this,G.type=="mouseover")}function E(F){C(this,F.type=="mouseenter")}function C(F,G){setTimeout(function(){var H=d.get(F).options;m.replace(F,G?h(H,H.hover):H,true)},10)}this.attach=function(F){if(F.onmouseenter===undefined){q(F,"mouseover",B);q(F,"mouseout",B)}else{q(F,"mouseenter",E);q(F,"mouseleave",E)}}}function u(){var C=[],D={};function B(H){var E=[],G;for(var F=0;G=H[F];++F){E[F]=C[D[G]]}return E}this.add=function(F,E){D[F]=C.push(E)-1};this.repeat=function(){var E=arguments.length?B(arguments):C,F;for(var G=0;F=E[G++];){m.replace(F[0],F[1],true)}}}function A(){var D={},B=0;function C(E){return E.cufid||(E.cufid=++B)}this.get=function(E){var F=C(E);return D[F]||(D[F]={})}}function a(B){var D={},C={};this.extend=function(E){for(var F in E){if(k(E,F)){D[F]=E[F]}}return this};this.get=function(E){return D[E]!=undefined?D[E]:B[E]};this.getSize=function(F,E){return C[F]||(C[F]=new n.Size(this.get(F),E))};this.isUsable=function(){return !!B}}function q(C,B,D){if(C.addEventListener){C.addEventListener(B,D,false)}else{if(C.attachEvent){C.attachEvent("on"+B,function(){return D.call(C,window.event)})}}}function v(C,B){var D=d.get(C);if(D.options){return C}if(B.hover&&B.hoverables[C.nodeName.toLowerCase()]){b.attach(C)}D.options=B;return C}function j(B){var C={};return function(D){if(!k(C,D)){C[D]=B.apply(null,arguments)}return C[D]}}function c(F,E){var B=n.quotedList(E.get("fontFamily").toLowerCase()),D;for(var C=0;D=B[C];++C){if(i[D]){return i[D].get(E.get("fontStyle"),E.get("fontWeight"))}}return null}function g(B){return document.getElementsByTagName(B)}function k(C,B){return C.hasOwnProperty(B)}function h(){var C={},B,F;for(var E=0,D=arguments.length;B=arguments[E],E<D;++E){for(F in B){if(k(B,F)){C[F]=B[F]}}}return C}function o(E,M,C,N,F,D){var K=document.createDocumentFragment(),H;if(M===""){return K}var L=N.separate;var I=M.split(p[L]),B=(L=="words");if(B&&t){if(/^\s/.test(M)){I.unshift("")}if(/\s$/.test(M)){I.push("")}}for(var J=0,G=I.length;J<G;++J){H=z[N.engine](E,B?n.textAlign(I[J],C,J,G):I[J],C,N,F,D,J<G-1);if(H){K.appendChild(H)}}return K}function l(D,M){var C=D.nodeName.toLowerCase();if(M.ignore[C]){return}var E=!M.textless[C];var B=n.getStyle(v(D,M)).extend(M);var F=c(D,B),G,K,I,H,L,J;if(!F){return}for(G=D.firstChild;G;G=I){K=G.nodeType;I=G.nextSibling;if(E&&K==3){if(H){H.appendData(G.data);D.removeChild(G)}else{H=G}if(I){continue}}if(H){D.replaceChild(o(F,n.whiteSpace(H.data,B,H,J),B,M,G,D),H);H=null}if(K==1){if(G.firstChild){if(G.nodeName.toLowerCase()=="cufon"){z[M.engine](F,null,B,M,G,D)}else{arguments.callee(G,M)}}J=G}}}var t=" ".split(/\s+/).length==0;var d=new A();var b=new r();var y=new u();var e=false;var z={},i={},w={autoDetect:false,engine:null,forceHitArea:false,hover:false,hoverables:{a:true},ignore:{applet:1,canvas:1,col:1,colgroup:1,head:1,iframe:1,map:1,optgroup:1,option:1,script:1,select:1,style:1,textarea:1,title:1,pre:1},printable:true,selector:(window.Sizzle||(window.jQuery&&function(B){return jQuery(B)})||(window.dojo&&dojo.query)||(window.Ext&&Ext.query)||(window.YAHOO&&YAHOO.util&&YAHOO.util.Selector&&YAHOO.util.Selector.query)||(window.$$&&function(B){return $$(B)})||(window.$&&function(B){return $(B)})||(document.querySelectorAll&&function(B){return document.querySelectorAll(B)})||g),separate:"words",textless:{dl:1,html:1,ol:1,table:1,tbody:1,thead:1,tfoot:1,tr:1,ul:1},textShadow:"none"};var p={words:/\s/.test("\u00a0")?/[^\S\u00a0]+/:/\s+/,characters:"",none:/^/};m.now=function(){x.ready();return m};m.refresh=function(){y.repeat.apply(y,arguments);return m};m.registerEngine=function(C,B){if(!B){return m}z[C]=B;return m.set("engine",C)};m.registerFont=function(D){if(!D){return m}var B=new s(D),C=B.family;if(!i[C]){i[C]=new f()}i[C].add(B);return m.set("fontFamily",'"'+C+'"')};m.replace=function(D,C,B){C=h(w,C);if(!C.engine){return m}if(!e){n.addClass(x.root(),"cufon-active cufon-loading");n.ready(function(){n.addClass(n.removeClass(x.root(),"cufon-loading"),"cufon-ready")});e=true}if(C.hover){C.forceHitArea=true}if(C.autoDetect){delete C.fontFamily}if(typeof C.textShadow=="string"){C.textShadow=n.textShadow(C.textShadow)}if(typeof C.color=="string"&&/^-/.test(C.color)){C.textGradient=n.gradient(C.color)}else{delete C.textGradient}if(!B){y.add(D,arguments)}if(D.nodeType||typeof D=="string"){D=[D]}n.ready(function(){for(var F=0,E=D.length;F<E;++F){var G=D[F];if(typeof G=="string"){m.replace(C.selector(G),C,true)}else{l(G,C)}}});return m};m.set=function(B,C){w[B]=C;return m};return m})();Cufon.registerEngine("canvas",(function(){var b=document.createElement("canvas");if(!b||!b.getContext||!b.getContext.apply){return}b=null;var a=Cufon.CSS.supports("display","inline-block");var e=!a&&(document.compatMode=="BackCompat"||/frameset|transitional/i.test(document.doctype.publicId));var f=document.createElement("style");f.type="text/css";f.appendChild(document.createTextNode(("cufon{text-indent:0;}@media screen,projection{cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;"+(e?"":"font-size:1px;line-height:1px;")+"}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;overflow:hidden;text-indent:-10000in;}"+(a?"cufon canvas{position:relative;}":"cufon canvas{position:absolute;}")+"}@media print{cufon{padding:0;}cufon canvas{display:none;}}").replace(/;/g,"!important;")));document.getElementsByTagName("head")[0].appendChild(f);function d(p,h){var n=0,m=0;var g=[],o=/([mrvxe])([^a-z]*)/g,k;generate:for(var j=0;k=o.exec(p);++j){var l=k[2].split(",");switch(k[1]){case"v":g[j]={m:"bezierCurveTo",a:[n+~~l[0],m+~~l[1],n+~~l[2],m+~~l[3],n+=~~l[4],m+=~~l[5]]};break;case"r":g[j]={m:"lineTo",a:[n+=~~l[0],m+=~~l[1]]};break;case"m":g[j]={m:"moveTo",a:[n=~~l[0],m=~~l[1]]};break;case"x":g[j]={m:"closePath"};break;case"e":break generate}h[g[j].m].apply(h,g[j].a)}return g}function c(m,k){for(var j=0,h=m.length;j<h;++j){var g=m[j];k[g.m].apply(k,g.a)}}return function(V,w,P,t,C,W){var k=(w===null);if(k){w=C.getAttribute("alt")}var A=V.viewBox;var m=P.getSize("fontSize",V.baseSize);var B=0,O=0,N=0,u=0;var z=t.textShadow,L=[];if(z){for(var U=z.length;U--;){var F=z[U];var K=m.convertFrom(parseFloat(F.offX));var I=m.convertFrom(parseFloat(F.offY));L[U]=[K,I];if(I<B){B=I}if(K>O){O=K}if(I>N){N=I}if(K<u){u=K}}}var Z=Cufon.CSS.textTransform(w,P).split("");var E=V.spacing(Z,~~m.convertFrom(parseFloat(P.get("letterSpacing"))||0),~~m.convertFrom(parseFloat(P.get("wordSpacing"))||0));if(!E.length){return null}var h=E.total;O+=A.width-E[E.length-1];u+=A.minX;var s,n;if(k){s=C;n=C.firstChild}else{s=document.createElement("cufon");s.className="cufon cufon-canvas";s.setAttribute("alt",w);n=document.createElement("canvas");s.appendChild(n);if(t.printable){var S=document.createElement("cufontext");S.appendChild(document.createTextNode(w));s.appendChild(S)}}var aa=s.style;var H=n.style;var j=m.convert(A.height);var Y=Math.ceil(j);var M=Y/j;var G=M*Cufon.CSS.fontStretch(P.get("fontStretch"));var J=h*G;var Q=Math.ceil(m.convert(J+O-u));var o=Math.ceil(m.convert(A.height-B+N));n.width=Q;n.height=o;H.width=Q+"px";H.height=o+"px";B+=A.minY;H.top=Math.round(m.convert(B-V.ascent))+"px";H.left=Math.round(m.convert(u))+"px";var r=Math.max(Math.ceil(m.convert(J)),0)+"px";if(a){aa.width=r;aa.height=m.convert(V.height)+"px"}else{aa.paddingLeft=r;aa.paddingBottom=(m.convert(V.height)-1)+"px"}var X=n.getContext("2d"),D=j/A.height;X.scale(D,D*M);X.translate(-u,-B);X.save();function T(){var x=V.glyphs,ab,l=-1,g=-1,y;X.scale(G,1);while(y=Z[++l]){var ab=x[Z[l]]||V.missingGlyph;if(!ab){continue}if(ab.d){X.beginPath();if(ab.code){c(ab.code,X)}else{ab.code=d("m"+ab.d,X)}X.fill()}X.translate(E[++g],0)}X.restore()}if(z){for(var U=z.length;U--;){var F=z[U];X.save();X.fillStyle=F.color;X.translate.apply(X,L[U]);T()}}var q=t.textGradient;if(q){var v=q.stops,p=X.createLinearGradient(0,A.minY,0,A.maxY);for(var U=0,R=v.length;U<R;++U){p.addColorStop.apply(p,v[U])}X.fillStyle=p}else{X.fillStyle=P.get("color")}T();return s}})());Cufon.registerEngine("vml",(function(){var e=document.namespaces;if(!e){return}e.add("cvml","urn:schemas-microsoft-com:vml");e=null;var b=document.createElement("cvml:shape");b.style.behavior="url(#default#VML)";if(!b.coordsize){return}b=null;var h=(document.documentMode||0)<8;document.write(('<style type="text/css">cufoncanvas{text-indent:0;}@media screen{cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}cufoncanvas{position:absolute;text-align:left;}cufon{display:inline-block;position:relative;vertical-align:'+(h?"middle":"text-bottom")+";}cufon cufontext{position:absolute;left:-10000in;font-size:1px;}a cufon{cursor:pointer}}@media print{cufon cufoncanvas{display:none;}}</style>").replace(/;/g,"!important;"));function c(i,j){return a(i,/(?:em|ex|%)$|^[a-z-]+$/i.test(j)?"1em":j)}function a(l,m){if(m==="0"){return 0}if(/px$/i.test(m)){return parseFloat(m)}var k=l.style.left,j=l.runtimeStyle.left;l.runtimeStyle.left=l.currentStyle.left;l.style.left=m.replace("%","em");var i=l.style.pixelLeft;l.style.left=k;l.runtimeStyle.left=j;return i}function f(l,k,j,n){var i="computed"+n,m=k[i];if(isNaN(m)){m=k.get(n);k[i]=m=(m=="normal")?0:~~j.convertFrom(a(l,m))}return m}var g={};function d(p){var q=p.id;if(!g[q]){var n=p.stops,o=document.createElement("cvml:fill"),i=[];o.type="gradient";o.angle=180;o.focus="0";o.method="sigma";o.color=n[0][1];for(var m=1,l=n.length-1;m<l;++m){i.push(n[m][0]*100+"% "+n[m][1])}o.colors=i.join(",");o.color2=n[l][1];g[q]=o}return g[q]}return function(ac,G,Y,C,K,ad,W){var n=(G===null);if(n){G=K.alt}var I=ac.viewBox;var p=Y.computedFontSize||(Y.computedFontSize=new Cufon.CSS.Size(c(ad,Y.get("fontSize"))+"px",ac.baseSize));var y,q;if(n){y=K;q=K.firstChild}else{y=document.createElement("cufon");y.className="cufon cufon-vml";y.alt=G;q=document.createElement("cufoncanvas");y.appendChild(q);if(C.printable){var Z=document.createElement("cufontext");Z.appendChild(document.createTextNode(G));y.appendChild(Z)}if(!W){y.appendChild(document.createElement("cvml:shape"))}}var ai=y.style;var R=q.style;var l=p.convert(I.height),af=Math.ceil(l);var V=af/l;var P=V*Cufon.CSS.fontStretch(Y.get("fontStretch"));var U=I.minX,T=I.minY;R.height=af;R.top=Math.round(p.convert(T-ac.ascent));R.left=Math.round(p.convert(U));ai.height=p.convert(ac.height)+"px";var F=Y.get("color");var ag=Cufon.CSS.textTransform(G,Y).split("");var L=ac.spacing(ag,f(ad,Y,p,"letterSpacing"),f(ad,Y,p,"wordSpacing"));if(!L.length){return null}var k=L.total;var x=-U+k+(I.width-L[L.length-1]);var ah=p.convert(x*P),X=Math.round(ah);var O=x+","+I.height,m;var J="r"+O+"ns";var u=C.textGradient&&d(C.textGradient);var o=ac.glyphs,S=0;var H=C.textShadow;var ab=-1,aa=0,w;while(w=ag[++ab]){var D=o[ag[ab]]||ac.missingGlyph,v;if(!D){continue}if(n){v=q.childNodes[aa];while(v.firstChild){v.removeChild(v.firstChild)}}else{v=document.createElement("cvml:shape");q.appendChild(v)}v.stroked="f";v.coordsize=O;v.coordorigin=m=(U-S)+","+T;v.path=(D.d?"m"+D.d+"xe":"")+"m"+m+J;v.fillcolor=F;if(u){v.appendChild(u.cloneNode(false))}var ae=v.style;ae.width=X;ae.height=af;if(H){var s=H[0],r=H[1];var B=Cufon.CSS.color(s.color),z;var N=document.createElement("cvml:shadow");N.on="t";N.color=B.color;N.offset=s.offX+","+s.offY;if(r){z=Cufon.CSS.color(r.color);N.type="double";N.color2=z.color;N.offset2=r.offX+","+r.offY}N.opacity=B.opacity||(z&&z.opacity)||1;v.appendChild(N)}S+=L[aa++]}var M=v.nextSibling,t,A;if(C.forceHitArea){if(!M){M=document.createElement("cvml:rect");M.stroked="f";M.className="cufon-vml-cover";t=document.createElement("cvml:fill");t.opacity=0;M.appendChild(t);q.appendChild(M)}A=M.style;A.width=X;A.height=af}else{if(M){q.removeChild(M)}}ai.width=Math.max(Math.ceil(p.convert(k*P)),0);if(h){var Q=Y.computedYAdjust;if(Q===undefined){var E=Y.get("lineHeight");if(E=="normal"){E="1em"}else{if(!isNaN(E)){E+="em"}}Y.computedYAdjust=Q=0.5*(a(ad,E)-parseFloat(ai.height))}if(Q){ai.marginTop=Math.ceil(Q)+"px";ai.marginBottom=Q+"px"}}return y}})());/*!
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * Digitized data (C) 2004 Agfa Monotype Corporation. Neo Sans(TM) is a trademark
 * of Agfa Monotype Corporation and may be registered in certain jurisdictions. 
 * All rights reserved. Neo Sans is designed by Sebastian Lester.
 * 
 * Trademark:
 * Neo Sans(TM) is a trademark of Agfa Monotype Corporation and may be registered
 * in certain jurisdictions.
 * 
 * Manufacturer:
 * Agfa Monotype Corporation
 * 
 * Designer:
 * Sebastian Lester
 * 
 * Vendor URL:
 * http://www.agfamonotype.com
 * 
 * License information:
 * http://www.agfamonotype.com/html/type/license.html
 */
Cufon.registerFont({"w":217,"face":{"font-family":"Neo Sans","font-weight":400,"font-stretch":"normal","units-per-em":"360","panose-1":"2 11 5 4 2 2 2 2 2 4","ascent":"288","descent":"-72","x-height":"2","bbox":"-16 -353 290.776 79.041","underline-thickness":"17.9297","underline-position":"-27.0703","unicode-range":"U+0020-U+20AC"},"glyphs":{" ":{"w":88},"!":{"d":"23,-264v1,-12,32,-10,32,0r-2,187v0,9,-11,7,-20,7v-3,0,-8,-3,-8,-7xm24,-41v3,-10,31,-9,31,0v-1,20,9,48,-24,41v-14,-2,-5,-28,-7,-41","w":78},"\"":{"d":"96,-271v9,2,28,-5,24,7r-21,68v-2,11,-14,6,-24,7v-3,0,-3,-4,-3,-7r17,-68v1,-5,3,-7,7,-7xm35,-271v9,1,27,-5,23,7r-21,68v0,11,-22,10,-27,3r17,-71v1,-5,4,-7,8,-7","w":130,"k":{".":23,",":23}},"#":{"d":"72,-261v2,-10,29,-11,29,0r-6,70r55,0r7,-70v-1,-11,13,-6,22,-7v4,0,6,3,6,7r-6,70v15,3,46,-9,40,15v-3,14,-28,4,-42,7r-7,73v16,3,46,-11,41,15v-3,14,-29,4,-43,7r-6,67v1,11,-13,6,-22,7v-4,0,-6,-2,-6,-7r6,-67r-56,0r-6,67v1,11,-13,6,-22,7v-4,0,-6,-3,-6,-7r6,-67v-15,-3,-44,10,-39,-15v3,-13,27,-5,41,-7r7,-73v-16,-3,-45,10,-40,-15v3,-13,27,-5,41,-7xm149,-169r-56,0r-7,73r56,0","w":237},"$":{"d":"114,-241v-43,0,-69,28,-44,56v33,37,120,50,120,116v0,41,-23,66,-66,70v-1,22,8,47,-24,41v-12,-2,-5,-26,-7,-40v-17,0,-35,-4,-52,-4v-10,0,-5,-14,-6,-22v0,-4,2,-6,7,-6v61,9,129,10,110,-55v-30,-47,-124,-49,-124,-121v0,-41,26,-59,65,-63v1,-20,-7,-44,24,-38v13,3,5,24,7,37v26,6,64,-9,59,26v-1,4,-3,6,-7,6v-32,-2,-52,-3,-62,-3"},"%":{"d":"221,-148v46,-1,51,43,49,92v-1,35,-15,58,-49,58v-47,0,-49,-43,-48,-91v1,-35,14,-58,48,-59xm209,-266v7,-4,30,-6,23,5r-154,261v-6,1,-30,5,-24,-6r150,-255v2,-3,4,-4,5,-5xm65,-270v46,-1,48,42,48,91v0,36,-15,59,-48,59v-46,0,-51,-42,-49,-92v1,-36,15,-57,49,-58xm221,-18v28,0,27,-40,26,-71v0,-25,-9,-38,-26,-38v-29,0,-27,40,-26,71v0,25,8,38,26,38xm65,-141v28,0,27,-40,26,-71v0,-25,-9,-38,-26,-38v-29,0,-28,39,-27,71v0,25,9,38,27,38","w":285},"&":{"d":"220,-130v1,36,-9,66,-23,88v11,13,25,23,34,38v-4,8,-26,4,-35,2r-18,-20v-45,41,-163,32,-159,-44v2,-39,23,-51,52,-71v-20,-25,-40,-38,-40,-76v0,-40,33,-54,76,-57v57,-3,89,50,60,94v-6,11,-34,30,-54,44r65,70v11,-17,14,-40,14,-68v0,-9,13,-5,21,-6v4,0,7,2,7,6xm107,-246v-42,-4,-60,36,-36,65v4,6,15,20,24,29v24,-17,53,-23,53,-61v0,-24,-16,-31,-41,-33xm52,-66v-2,53,81,53,109,25r-72,-76v-23,16,-35,21,-37,51","w":244},"'":{"d":"35,-271v9,1,27,-5,23,7r-21,68v0,11,-22,10,-27,3r17,-71v1,-5,4,-7,8,-7","w":69,"k":{".":23,",":23}},"(":{"d":"101,-268v-61,83,-65,255,0,340v-4,6,-24,4,-29,-1v-66,-71,-66,-265,0,-338v4,-6,23,-7,29,-1","w":109},")":{"d":"14,72v65,-86,61,-257,0,-340v33,-14,46,25,56,47v40,87,27,243,-31,295v-6,1,-22,4,-25,-2","w":109},"*":{"d":"22,-210v-11,-3,-2,-18,3,-21r48,15r0,-47v-1,-10,8,-6,16,-7v4,0,6,2,6,7r-1,47r49,-15v5,3,13,18,3,21r-45,14v8,17,45,42,16,54v-16,-9,-21,-28,-33,-41v-12,14,-28,58,-47,30v8,-16,21,-28,30,-43","w":167},"+":{"d":"184,-154v12,1,10,26,0,26r-62,0r0,62v1,11,-11,6,-20,7v-4,0,-6,-2,-6,-7r0,-62r-62,0v-11,1,-6,-11,-7,-20v0,-4,2,-6,7,-6r62,0r0,-62v-1,-11,11,-6,20,-7v4,0,6,2,6,7r0,62r62,0"},",":{"d":"35,-46v9,1,29,-4,25,6r-30,74v-5,1,-25,5,-22,-6r20,-68v1,-5,4,-6,7,-6","w":76,"k":{"'":23,"\"":23}},"-":{"d":"96,-119v9,0,7,12,7,21v0,4,-3,6,-7,6r-72,0v-11,1,-6,-11,-7,-20v0,-4,3,-7,7,-7r72,0","w":119},".":{"d":"23,-41v1,-12,31,-10,31,0v-1,20,8,48,-24,41v-13,-3,-5,-27,-7,-41","w":76,"k":{"'":23,"\"":23}},"\/":{"d":"90,-260v1,-13,31,-12,30,0r-82,253v-1,12,-25,10,-30,2","w":127,"k":{"\/":12}},"0":{"d":"109,-270v80,-1,88,72,88,160v0,70,-25,110,-88,112v-83,1,-88,-73,-88,-160v0,-70,25,-110,88,-112xm109,-25v60,0,57,-69,56,-133v-1,-46,-11,-84,-56,-84v-61,-1,-55,70,-55,132v0,49,11,85,55,85"},"1":{"d":"105,-265v8,-5,28,-6,29,4r0,254v1,12,-16,6,-26,7v-4,0,-7,-2,-6,-7r0,-227v-18,7,-33,16,-52,22v-5,-3,-6,-24,1,-27"},"2":{"d":"39,-263v61,-14,154,-14,150,58v-5,92,-137,72,-131,177r121,0v10,-1,6,12,7,21v0,4,-3,7,-7,7r-143,0v-20,-26,0,-94,23,-110v26,-34,98,-43,98,-95v0,-53,-68,-32,-119,-32v-9,0,-10,-24,1,-26"},"3":{"d":"30,-243v-4,-36,49,-22,68,-27v56,1,92,18,90,75v-1,28,-15,46,-35,56v23,12,35,32,35,64v0,76,-80,86,-151,70v-9,-2,-6,-10,-7,-19v0,-4,2,-6,7,-6v63,8,117,16,117,-52v0,-52,-58,-45,-108,-44v-9,0,-10,-26,0,-26v52,-1,108,13,108,-48v0,-56,-73,-43,-118,-37v-4,0,-6,-2,-6,-6"},"4":{"d":"166,-99v18,1,43,-9,38,21v-2,13,-26,5,-38,7r0,64v0,11,-17,6,-27,7v-4,0,-6,-2,-6,-7r0,-64r-104,0v-21,2,-19,-29,-11,-41r107,-150v4,-9,38,-12,41,2r0,161xm133,-99r-2,-125v-31,39,-59,81,-87,123v24,6,61,0,89,2"},"5":{"d":"65,-162v72,-2,125,10,125,81v0,80,-82,94,-155,77v-10,0,-10,-23,-2,-26v55,9,124,15,124,-57v0,-57,-63,-47,-119,-48v-4,0,-5,-3,-5,-7r10,-119v0,-4,3,-7,7,-7r124,0v10,0,7,13,7,22v0,4,-2,6,-7,6r-104,0"},"6":{"d":"54,-159v70,-18,144,-5,143,70v-1,58,-29,91,-88,91v-86,0,-87,-77,-87,-165v0,-70,26,-111,93,-107v29,2,74,-10,71,27v0,5,-4,6,-9,6v-20,-4,-41,-6,-62,-6v-51,0,-63,31,-61,84xm109,-24v41,0,55,-25,55,-67v0,-57,-64,-53,-110,-43v-1,57,-2,110,55,110"},"7":{"d":"165,-268v25,-1,32,21,22,42r-104,221v-3,10,-18,3,-29,5v-6,1,-6,-5,-4,-9r109,-228v-36,-7,-86,1,-126,-2v-11,0,-6,-13,-7,-22v1,-4,3,-6,7,-7r132,0","k":{"\/":36}},"8":{"d":"163,-140v21,11,35,34,35,65v0,53,-37,78,-91,77v-53,0,-90,-27,-87,-83v0,-27,15,-49,35,-59v-21,-11,-35,-27,-34,-59v1,-52,37,-71,90,-71v52,0,87,22,87,74v-1,29,-15,46,-35,56xm98,-153v41,0,70,-8,68,-46v-1,-32,-23,-44,-59,-44v-35,0,-55,14,-55,47v0,27,18,43,46,43xm107,-25v38,0,60,-18,59,-56v-1,-35,-27,-49,-68,-46v-30,2,-46,20,-45,52v1,32,19,50,54,50"},"9":{"d":"106,-270v85,-2,87,77,87,165v0,69,-26,108,-94,107v-27,-1,-57,1,-70,-12v1,-9,-3,-22,8,-21v20,4,41,6,62,6v54,1,63,-30,62,-84v-66,17,-146,7,-143,-70v3,-59,29,-90,88,-91xm50,-179v-3,58,63,58,110,45v3,-57,2,-109,-54,-109v-41,0,-54,23,-56,64"},":":{"d":"24,-191v1,-12,31,-10,31,0v-1,20,9,47,-24,41v-13,-3,-5,-27,-7,-41xm24,-41v3,-10,31,-9,31,0v-1,20,9,47,-24,41v-13,-3,-5,-27,-7,-41","w":78},";":{"d":"24,-191v1,-12,31,-10,31,0v-1,20,9,48,-24,41v-14,-2,-5,-28,-7,-41xm31,-46v9,1,30,-5,25,7r-30,73v-4,4,-25,5,-22,-5r20,-68v1,-5,4,-7,7,-7","w":78},"<":{"d":"170,-60v3,3,5,10,-1,10v-13,0,-24,2,-32,-5r-87,-73v-8,-7,-8,-18,0,-25v33,-25,61,-57,98,-78v10,0,35,-1,22,10r-94,80"},"=":{"d":"40,-168v-10,1,-8,-11,-8,-20v0,-4,3,-6,8,-6r138,0v11,-1,6,12,7,21v0,4,-3,5,-7,5r-138,0xm178,-114v12,1,10,26,0,26r-138,0v-11,1,-7,-11,-8,-20v0,-4,3,-6,8,-6r138,0"},">":{"d":"167,-153v9,7,9,18,0,25v-33,25,-60,58,-98,78v-11,0,-34,2,-21,-10r94,-81v-32,-29,-69,-54,-98,-86v5,-7,29,-6,37,1"},"?":{"d":"18,-265v60,-14,139,-2,118,71v-13,43,-70,56,-65,117v0,10,-14,6,-23,7v-15,-4,-6,-42,-2,-53v12,-31,60,-50,58,-93v-2,-38,-49,-24,-87,-22v-8,0,-4,-12,-5,-19v0,-5,1,-8,6,-8xm40,-40v1,-12,32,-10,31,0v-1,20,8,47,-24,40v-13,-3,-5,-26,-7,-40","w":160},"@":{"d":"40,-183v50,-81,222,-68,222,51v0,84,-46,112,-131,112v-76,0,-69,-105,-34,-141v20,-20,58,-15,92,-9v5,1,8,3,8,9r-11,113v42,-5,52,-36,52,-84v0,-86,-110,-104,-162,-59v-33,27,-38,78,-38,133v0,73,69,83,145,75v1,5,4,19,-5,19v-92,0,-170,-13,-163,-105v3,-43,6,-84,25,-114xm117,-142v-16,27,-33,97,23,97v7,0,13,-1,16,-1r9,-101v-20,-2,-37,-5,-48,5","w":276},"A":{"d":"44,-5v-5,9,-33,8,-34,-1r67,-237v5,-35,63,-35,73,0r67,237v-1,10,-28,9,-33,1r-24,-83r-93,0xm154,-117r-33,-118v-2,-9,-12,-9,-14,0r-33,118r80,0","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"u":4,"t":16,"q":4,"o":4,"g":4,"f":16,"e":4,"d":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"S":6,"Q":9,"O":9,"L":7,"G":8,"C":8}},"B":{"d":"164,-138v24,9,40,30,40,64v0,51,-35,76,-105,76v-30,-1,-51,1,-68,-6v-9,-75,0,-169,-3,-250v5,-24,41,-16,69,-16v60,0,105,13,105,75v0,28,-16,49,-38,57xm170,-195v0,-55,-58,-47,-109,-46r0,89v50,1,109,7,109,-43xm61,-27v54,4,110,8,110,-53v0,-53,-58,-47,-110,-46r0,99","w":221,"k":{"\u00dd":12,"\u00c6":8,"Y":12,"T":12,"A":7}},"C":{"d":"54,-159v0,68,0,134,63,132r61,-3v9,0,5,13,6,21v-10,15,-41,10,-67,11v-84,3,-95,-70,-95,-161v0,-94,63,-127,155,-105v11,-1,4,15,6,23v0,3,-2,4,-5,4v-79,-11,-124,0,-124,78","w":196,"k":{"\u00fd":8,"\u00d2":10,"\u00d4":10,"\u00d3":10,"\u00ff":8,"\u00d5":10,"\u00d8":10,"\u00d6":10,"y":8,"o":4,"Q":10,"O":10,"G":10,"C":6}},"D":{"d":"51,-268v95,-12,159,17,159,110v0,118,-36,177,-159,159v-9,-1,-23,-1,-23,-11r0,-247v0,-10,14,-10,23,-11xm61,-26v66,8,117,-12,117,-84v0,-75,-6,-135,-77,-132v-15,0,-28,0,-40,1r0,215","w":230,"k":{"\u00c1":8,"\u00c2":8,"\u00c3":8,"\u00c0":8,"\u00c6":8,"\u00c5":8,"\u00c4":8,"Z":8,"Y":11,"X":11,"W":4,"V":7,"T":13,"A":8}},"E":{"d":"61,-125v2,48,-15,98,44,98r70,0v7,1,6,24,0,28v-11,1,-34,1,-70,1v-51,1,-77,-18,-77,-67r0,-138v-5,-74,75,-71,147,-65v6,1,7,25,0,28v-46,5,-121,-19,-114,37r0,50r110,0v9,0,8,11,8,21v0,4,-5,7,-8,7r-110,0","w":198},"F":{"d":"171,-153v9,0,8,11,8,21v0,4,-5,7,-8,7r-110,0r0,118v0,11,-16,6,-26,7v-4,0,-7,-3,-7,-7r0,-196v-5,-74,75,-71,147,-65v6,1,7,25,0,28v-46,5,-121,-19,-114,37r0,50r110,0","w":198,"k":{"\u00c1":22,"\u00c2":22,"\u00c3":22,"\u00c0":22,"\u00c6":22,"\u00f5":10,"\u00f6":10,"\u00f4":10,"\u00f2":10,"\u00f3":10,"\u00c5":22,"\u00c4":22,"o":10,"O":4,"A":22,".":33,",":33}},"G":{"d":"159,-132v2,-12,34,-10,33,0r0,121v0,3,-3,8,-6,8v-20,4,-46,5,-72,5v-79,-1,-93,-70,-93,-160v0,-98,73,-126,165,-107v10,0,5,14,6,23v0,2,-3,4,-6,4v-20,-2,-43,-2,-69,-2v-64,-2,-63,63,-63,130v0,67,35,94,105,81r0,-103","w":220,"k":{"V":5}},"H":{"d":"184,-260v1,-13,33,-11,33,0r0,253v0,10,-33,12,-33,0r0,-120r-123,0r0,120v0,11,-16,6,-26,7v-4,0,-7,-3,-7,-7r0,-253v0,-11,15,-8,26,-8v4,1,7,4,7,8r0,104r123,0r0,-104","w":244},"I":{"d":"32,-261v2,-12,33,-10,33,0r0,254v0,11,-17,6,-27,7v-4,0,-6,-3,-6,-7r0,-254","w":96},"J":{"d":"32,-261v2,-12,33,-10,33,0r0,274v2,43,-35,59,-75,49v-5,-3,-6,-25,5,-24v24,1,37,-1,37,-25r0,-274","w":92},"K":{"d":"28,-261v2,-12,33,-10,33,0r0,117r104,-120v6,-6,33,-8,38,1r-110,126r110,133v-5,7,-33,6,-41,0r-101,-123r0,120v0,11,-16,6,-26,7v-4,0,-7,-3,-7,-7r0,-254","w":218,"k":{"\u00fd":20,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":17,"\u00d4":17,"\u00d3":17,"\u00c8":13,"\u00cb":13,"\u00ca":13,"\u00ff":20,"\u00d5":17,"\u00d8":17,"\u00fc":15,"\u00fb":15,"\u00f9":15,"\u00fa":15,"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"\u00eb":16,"\u00ea":16,"\u00e8":16,"\u00e9":16,"\u00dc":7,"\u00d6":17,"\u00c9":13,"\u00c7":20,"y":20,"w":18,"v":21,"u":15,"t":10,"q":13,"o":13,"f":5,"e":16,"d":16,"c":16,"V":4,"U":7,"T":5,"Q":17,"O":17,"L":6,"G":25,"E":13,"C":25,"-":14}},"L":{"d":"61,-65v-6,57,67,33,114,38v7,1,6,23,0,26v-65,5,-147,15,-147,-64r0,-195v0,-11,15,-8,26,-8v4,1,7,4,7,8r0,195","w":185,"k":{"\u00fd":19,"\u00dd":37,"\u00d9":14,"\u00db":14,"\u00da":14,"\u00d2":16,"\u00d4":16,"\u00d3":16,"\u00c8":7,"\u00cb":7,"\u00ca":7,"\u00ff":19,"\u00d5":16,"\u00d8":16,"\u00ae":21,"\u00eb":8,"\u00ea":8,"\u00e8":8,"\u00e9":8,"\u00dc":14,"\u00d6":16,"\u00c9":7,"y":19,"w":10,"v":18,"o":9,"e":8,"Y":37,"W":13,"V":33,"U":14,"T":36,"S":7,"Q":16,"O":16,"G":14,"E":7,"C":12,"-":14}},"M":{"d":"201,-261v7,-12,45,-12,45,4r0,250v0,10,-15,6,-25,7v-4,0,-7,-3,-7,-7r0,-215v-20,38,-34,82,-59,115v-10,5,-39,7,-42,-7r-53,-108r0,215v0,10,-15,6,-25,7v-4,0,-7,-3,-7,-7r0,-250v0,-16,38,-15,45,-4r64,127v2,0,4,-1,5,-4","w":274,"k":{"\u00dd":13,"Y":13,"V":7}},"N":{"d":"185,-261v2,-12,32,-10,32,0r0,251v0,15,-39,15,-45,4r-112,-212r0,211v0,11,-27,10,-32,3r0,-253v-1,-15,38,-16,45,-3r111,211","w":244,"k":{"\u00dd":6,"Y":6,"V":8,"T":12}},"O":{"d":"119,-270v83,0,101,67,97,159v-3,70,-29,112,-97,113v-85,1,-97,-69,-97,-159v0,-70,31,-113,97,-113xm55,-157v0,67,-1,130,64,130v59,0,66,-62,64,-130v-2,-50,-15,-83,-64,-83v-43,0,-64,27,-64,83","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c6":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"P":{"d":"60,-7v0,12,-33,10,-32,0r0,-251v0,-5,3,-8,9,-9v17,-2,37,-3,60,-3v69,1,100,26,100,83v0,67,-58,87,-137,79r0,101xm60,-135v57,3,105,4,105,-57v0,-53,-53,-52,-105,-49r0,106","w":213,"k":{"\u00c1":22,"\u00c2":22,"\u00c3":22,"\u00c0":22,"\u00e6":8,"\u00c6":25,"\u00f5":7,"\u00f6":7,"\u00f4":7,"\u00f2":7,"\u00f3":7,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e5":8,"\u00e3":8,"\u00e4":8,"\u00e2":8,"\u00e0":8,"\u00e1":8,"\u00c5":22,"\u00c4":22,"o":7,"e":7,"a":8,"Z":12,"A":22,".":38,",":38}},"Q":{"d":"119,-270v83,0,97,67,97,159v0,64,-26,106,-81,113v0,21,-3,36,22,36v15,0,34,-5,29,18v0,6,-10,9,-29,9v-42,2,-58,-20,-54,-64v-70,-7,-81,-74,-81,-158v0,-70,31,-113,97,-113xm55,-157v0,67,-1,130,64,130v59,0,66,-62,64,-130v-2,-50,-15,-83,-64,-83v-43,0,-64,27,-64,83","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c6":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"R":{"d":"201,-193v1,43,-24,66,-57,76r67,112v-3,9,-32,8,-37,0r-64,-107r-50,-1r0,106v1,11,-15,6,-25,7v-4,0,-7,-3,-7,-7r0,-252v7,-17,45,-10,72,-11v59,-3,100,20,101,77xm60,-141v63,2,104,7,108,-52v4,-54,-64,-48,-108,-46r0,98","w":225,"k":{"\u00fd":7,"\u00dd":15,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":7,"\u00d5":7,"\u00d8":7,"\u00f5":9,"\u00f6":9,"\u00f4":9,"\u00f2":9,"\u00f3":9,"\u00eb":8,"\u00ea":8,"\u00e8":8,"\u00e9":8,"\u00d6":7,"\u00c7":7,"y":7,"o":9,"g":5,"e":8,"c":5,"Y":15,"W":2,"V":12,"T":15,"Q":7,"O":7,"G":7,"C":7}},"S":{"d":"167,-238v-45,1,-117,-18,-116,32v18,64,126,57,129,137v3,70,-75,67,-149,67v-10,0,-6,-12,-7,-21v0,-4,3,-6,8,-6v44,1,122,13,114,-40v-10,-68,-126,-58,-128,-137v-1,-54,51,-69,110,-63v21,3,51,-6,45,25v0,4,-2,6,-6,6","w":197,"k":{"\u00c6":5,"y":6,"x":5,"v":8,"t":14,"Y":8,"W":5,"V":9,"A":7}},"T":{"d":"193,-268v10,0,6,14,7,23v0,4,-2,6,-7,6r-70,0r0,232v0,11,-16,6,-26,7v-4,0,-7,-3,-7,-7r0,-232r-70,0v-11,1,-6,-13,-7,-22v0,-4,3,-7,7,-7r173,0","w":212,"k":{"\u00fd":23,"\u00d2":16,"\u00d4":16,"\u00d3":16,"\u00c8":10,"\u00cb":10,"\u00c1":32,"\u00ca":10,"\u00c2":32,"\u00ff":23,"\u00d5":16,"\u00c3":32,"\u00c0":32,"\u00e6":31,"\u00d8":16,"\u00c6":32,"\u00fc":15,"\u00fb":15,"\u00f9":15,"\u00fa":15,"\u00f5":32,"\u00f6":32,"\u00f4":32,"\u00f2":32,"\u00f3":32,"\u00eb":29,"\u00ea":29,"\u00e8":29,"\u00e9":29,"\u00e5":31,"\u00e3":31,"\u00e4":31,"\u00e2":31,"\u00e0":31,"\u00e1":31,"\u00d6":16,"\u00c9":10,"\u00c5":32,"\u00c4":32,"z":13,"y":23,"x":14,"w":12,"v":12,"u":15,"t":12,"s":28,"r":17,"q":29,"p":14,"o":32,"n":14,"m":14,"g":23,"e":29,"d":30,"c":28,"a":31,"Q":16,"O":16,"G":11,"F":7,"E":10,"C":14,"A":32,".":27,",":27}},"U":{"d":"178,-261v2,-12,33,-10,33,0v-6,113,33,263,-92,263v-125,0,-86,-150,-92,-263v0,-11,16,-6,26,-7v4,0,7,3,7,7r0,164v0,47,13,72,59,72v44,0,59,-25,59,-72r0,-164","w":238,"k":{"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c6":9,"\u00c5":9,"\u00c4":9,"A":9}},"V":{"d":"12,-261v2,-12,32,-10,34,-1r63,229v3,10,11,11,14,0r63,-229v1,-10,34,-11,33,3r-66,234v-6,35,-64,36,-74,0","w":231,"k":{"\u00fd":12,"\u00d2":8,"\u00d4":8,"\u00d3":8,"\u00c8":9,"\u00cb":9,"\u00c1":25,"\u00ca":9,"\u00c2":25,"\u00ff":12,"\u00d5":8,"\u00c3":25,"\u00c0":25,"\u00a1":9,"\u00bf":33,"\u00e6":19,"\u00d8":8,"\u00c6":25,"\u00fc":13,"\u00fb":13,"\u00f9":13,"\u00fa":13,"\u00f5":18,"\u00f6":18,"\u00f4":18,"\u00f2":18,"\u00f3":18,"\u00eb":18,"\u00ea":18,"\u00e8":18,"\u00e9":18,"\u00e5":19,"\u00e3":19,"\u00e4":19,"\u00e2":19,"\u00e0":19,"\u00e1":19,"\u00d6":8,"\u00c9":9,"\u00c5":25,"\u00c4":25,"z":10,"y":12,"x":14,"w":9,"v":9,"u":13,"s":18,"r":12,"q":18,"p":9,"o":18,"n":9,"m":9,"g":17,"e":18,"c":17,"a":19,"S":8,"Q":8,"O":8,"G":8,"E":9,"C":9,"A":25,".":27,",":27}},"W":{"d":"252,-261v3,-13,35,-10,33,1r-40,243v0,26,-57,25,-58,0r-39,-136v-15,42,-24,92,-37,136v-1,23,-53,28,-58,0r-40,-244v0,-12,17,-6,27,-7v3,0,5,3,6,7r36,234v16,-42,24,-94,38,-138v2,-22,51,-23,57,0r38,138v15,-73,24,-158,37,-234","w":297,"k":{"\u00d2":5,"\u00d4":5,"\u00d3":5,"\u00c1":16,"\u00c2":16,"\u00d5":5,"\u00c3":16,"\u00c0":16,"\u00bf":19,"\u00e6":9,"\u00d8":5,"\u00c6":16,"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"\u00eb":11,"\u00ea":11,"\u00e8":11,"\u00e9":11,"\u00e5":9,"\u00e3":9,"\u00e4":9,"\u00e2":9,"\u00e0":9,"\u00e1":9,"\u00d6":5,"\u00c5":16,"\u00c4":16,"o":13,"e":11,"a":9,"Q":5,"O":5,"G":4,"C":4,"A":16}},"X":{"d":"180,-264v7,-7,40,-7,33,5r-78,124r82,130v-2,9,-31,7,-36,0r-66,-105r-64,105v-4,10,-18,3,-29,5v-6,1,-6,-5,-4,-9r80,-127r-81,-126v1,-10,29,-8,36,-2r64,103","w":232,"k":{"\u00fd":13,"\u00d2":16,"\u00d4":16,"\u00d3":16,"\u00ff":13,"\u00d5":16,"\u00d8":16,"\u00fc":12,"\u00fb":12,"\u00f9":12,"\u00fa":12,"\u00f5":12,"\u00f6":12,"\u00f4":12,"\u00f2":12,"\u00f3":12,"\u00eb":10,"\u00ea":10,"\u00e8":10,"\u00e9":10,"\u00d6":16,"y":13,"v":15,"u":12,"o":12,"e":10,"Q":16,"O":16,"G":13,"C":13}},"Y":{"d":"163,-262v4,-10,33,-9,35,0r-57,129v-6,13,-13,20,-20,23r0,103v0,11,-16,6,-26,7v-4,0,-7,-2,-6,-7r0,-103v-7,-3,-14,-10,-20,-23r-56,-129v0,-10,31,-8,34,0r50,116v5,13,11,13,16,0","w":209,"k":{"\u00fd":20,"\u00d2":14,"\u00d4":14,"\u00d3":14,"\u00c8":10,"\u00cb":10,"\u00c1":31,"\u00ca":10,"\u00c2":31,"\u00ff":20,"\u00d5":14,"\u00c3":31,"\u00c0":31,"\u00a1":20,"\u00bf":46,"\u00e6":31,"\u00d8":14,"\u00c6":31,"\u00fc":26,"\u00fb":26,"\u00f9":26,"\u00fa":26,"\u00f5":35,"\u00f6":35,"\u00f4":35,"\u00f2":35,"\u00f3":35,"\u00eb":34,"\u00ea":34,"\u00e8":34,"\u00e9":34,"\u00e5":31,"\u00e3":31,"\u00e4":31,"\u00e2":31,"\u00e0":31,"\u00e1":31,"\u00d6":14,"\u00c9":10,"\u00c7":16,"\u00c5":31,"\u00c4":31,"z":25,"y":20,"x":20,"w":20,"v":21,"u":26,"t":13,"s":26,"r":27,"q":35,"p":27,"o":35,"n":17,"m":17,"g":33,"f":13,"e":34,"d":33,"c":33,"a":31,"S":8,"Q":14,"O":14,"G":16,"E":10,"C":16,"A":31,"\/":33,".":33,"-":28,",":33}},"Z":{"d":"160,-268v31,-4,39,24,25,45r-129,191v38,6,91,0,133,2v11,0,6,14,7,23v0,4,-3,7,-7,7r-139,0v-31,5,-37,-27,-25,-45r131,-191v-36,-6,-84,0,-124,-2v-10,0,-6,-14,-7,-23v0,-4,3,-7,7,-7r128,0","w":214,"k":{"\u00fd":11,"\u00d2":11,"\u00d4":11,"\u00d3":11,"\u00ff":11,"\u00d5":11,"\u00e6":8,"\u00d8":11,"\u00fc":12,"\u00fb":12,"\u00f9":12,"\u00fa":12,"\u00f5":11,"\u00f6":11,"\u00f4":11,"\u00f2":11,"\u00f3":11,"\u00eb":12,"\u00ea":12,"\u00e8":12,"\u00e9":12,"\u00e5":8,"\u00e3":8,"\u00e4":8,"\u00e2":8,"\u00e0":8,"\u00e1":8,"\u00d6":11,"y":11,"v":12,"u":12,"o":11,"g":14,"e":12,"c":14,"a":8,"W":4,"Q":11,"O":11,"G":11,"C":9}},"[":{"d":"61,44v19,4,54,-12,48,19v1,4,-4,7,-7,7r-67,0v-4,0,-6,-3,-6,-7r0,-324v1,-4,3,-6,6,-7r67,0v7,1,8,11,7,20v-2,14,-32,4,-48,7r0,285","w":117},"\\":{"d":"9,-260v-4,-11,13,-7,23,-8v3,0,5,3,6,8r82,255v-2,8,-26,9,-30,-2","w":127},"]":{"d":"83,-268v4,0,6,3,6,7r0,324v0,4,-2,7,-6,7r-67,0v-8,0,-7,-10,-7,-19v4,-14,33,-4,48,-7r0,-285v-20,-4,-55,12,-48,-19v-1,-3,4,-8,7,-8r67,0","w":117},"^":{"d":"180,-210v2,2,4,7,-2,7v-41,0,-47,-31,-69,-49r-42,48v-7,1,-37,5,-29,-6r46,-59v16,0,46,-6,55,6"},"_":{"d":"182,18v8,-1,7,7,7,14v0,4,-2,6,-7,6r-186,0v-9,1,-7,-7,-7,-15v0,-4,3,-5,7,-5r186,0","w":177},"`":{"d":"86,-230v3,1,2,7,-2,6v-11,-1,-24,3,-27,-6r-43,-48v7,-4,32,-5,37,3","w":133},"a":{"d":"131,-118v1,-35,-3,-56,-39,-55r-57,2v-9,1,-5,-11,-6,-18v0,-4,2,-6,7,-7v62,-13,126,-5,126,63r0,126v0,10,-13,7,-23,7v-7,0,-9,-7,-8,-15v-39,28,-114,25,-114,-45v0,-57,54,-60,114,-58xm49,-60v0,51,56,39,82,22r0,-58v-41,1,-82,-5,-82,36","w":186,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":11,"t":9,"f":7}},"b":{"d":"56,-197v80,-18,129,20,121,111v-5,53,-25,89,-79,88v-25,0,-51,-2,-72,-8v-7,-80,1,-174,-2,-258v0,-10,15,-6,25,-7v4,0,7,3,7,7r0,67xm56,-27v70,13,97,-13,89,-85v5,-56,-36,-68,-89,-58r0,143","w":194,"k":{"x":8,"t":11,"f":7}},"c":{"d":"95,-201v20,0,58,-8,52,25v0,5,-3,6,-8,6v-51,-8,-89,-4,-89,57v0,47,2,91,45,88r46,-3v9,0,5,11,6,19v-4,16,-36,11,-52,11v-62,2,-80,-48,-77,-115v2,-53,26,-88,77,-88","w":162,"k":{"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"o":13}},"d":{"d":"18,-86v0,-90,40,-130,121,-111r0,-67v-1,-11,15,-6,25,-7v4,0,6,3,6,7r-1,258v-20,6,-47,8,-72,8v-54,0,-79,-33,-79,-88xm50,-112v0,48,0,89,47,87v11,0,25,0,42,-2r0,-143v-49,-10,-89,0,-89,58","w":194},"e":{"d":"50,-89v-10,73,59,60,116,60v9,0,4,15,4,23v-69,20,-161,8,-152,-78v-6,-69,17,-117,80,-117v58,1,83,40,79,104v0,5,-2,8,-7,8r-120,0xm145,-113v1,-38,-11,-60,-47,-60v-33,0,-49,21,-48,60r95,0","w":195,"k":{"\u00fd":7,"\u00ff":7,"y":7,"x":10,"w":2,"v":7,"t":11,"f":7,"T":33}},"f":{"d":"101,-274v14,0,32,0,27,20v-9,13,-53,-6,-46,30r0,26v19,3,51,-11,45,20v-3,14,-31,4,-45,7r0,164v0,10,-14,6,-24,7v-4,0,-7,-3,-7,-7r0,-164v-16,-5,-48,6,-42,-21v3,-12,28,-4,42,-6v-3,-46,5,-76,50,-76","w":137,"k":{"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":9,"\u00ea":9,"\u00e8":9,"\u00e9":9,"s":5,"q":7,"o":8,"g":8,"e":9,"d":4,"c":8,".":20,",":20}},"g":{"d":"180,-198v8,0,9,8,8,17v0,9,-12,7,-19,10v30,46,4,101,-68,101v-22,0,-60,-17,-48,13v45,23,131,10,131,73v0,43,-32,56,-82,56v-49,0,-82,-15,-82,-60v0,-21,9,-37,22,-46v-23,-6,-25,-46,-4,-56v-39,-41,-8,-108,63,-108r79,0xm101,-95v33,-1,49,-9,49,-39v0,-28,-16,-40,-49,-39v-33,0,-48,12,-48,42v1,25,17,37,48,36xm102,47v42,7,67,-28,41,-50v-13,-11,-53,-16,-75,-22v-12,10,-18,19,-18,40v1,27,22,33,52,32","w":201},"h":{"d":"56,-189v53,-26,120,-9,120,63r0,119v0,11,-30,11,-32,0v-7,-60,25,-163,-38,-166v-15,0,-39,5,-50,10r0,156v0,11,-30,11,-32,0r0,-256v0,-11,15,-7,25,-8v5,0,7,3,7,8r0,74","w":200,"k":{"\u00fd":7,"\u00ff":7,"y":7,"t":7,"f":7}},"i":{"d":"28,-266v2,-12,34,-10,33,0v-1,12,6,34,-7,36v-10,-1,-26,4,-26,-7r0,-29xm28,-191v2,-12,32,-10,32,0r0,184v0,11,-30,11,-32,0r0,-184","w":88},"j":{"d":"28,-266v2,-12,34,-10,33,0v-1,12,6,34,-7,36v-10,-1,-26,4,-26,-7r0,-29xm28,-191v2,-12,33,-10,32,0r0,214v6,45,-41,57,-71,41v1,-9,-3,-20,8,-19v20,0,31,2,31,-22r0,-214","w":88},"k":{"d":"24,-263v1,-13,32,-12,32,0r0,149r72,-81v6,-5,43,-7,36,5r-79,86r81,99v-3,10,-32,7,-38,0r-72,-88r0,86v0,11,-30,11,-32,0r0,-256","w":178,"k":{"\u00e6":5,"\u00f5":12,"\u00f6":12,"\u00f4":12,"\u00f2":12,"\u00f3":12,"\u00eb":13,"\u00ea":13,"\u00e8":13,"\u00e9":13,"\u00e5":5,"\u00e3":5,"\u00e4":5,"\u00e2":5,"\u00e0":5,"\u00e1":5,"q":10,"o":12,"e":13,"d":9,"c":10,"a":5}},"l":{"d":"28,-264v2,-12,32,-10,32,0r0,257v0,10,-15,6,-25,7v-4,0,-7,-3,-7,-7r0,-257","w":87},"m":{"d":"145,-186v52,-28,118,-19,118,51r0,128v0,10,-15,6,-25,7v-4,0,-7,-3,-7,-7r0,-128v2,-46,-40,-43,-75,-28v7,46,1,105,3,156v1,11,-15,6,-25,7v-4,0,-6,-3,-6,-7r0,-128v3,-49,-37,-43,-72,-24r0,152v0,11,-15,6,-25,7v-4,0,-7,-3,-7,-7r0,-184v0,-10,15,-6,25,-7v7,0,7,7,7,14v29,-18,66,-26,89,-2","w":287,"k":{"y":5,"t":7,"f":7}},"n":{"d":"56,-184v47,-33,120,-19,120,58r0,119v0,11,-30,11,-32,0r0,-119v5,-56,-48,-55,-88,-33r0,152v0,11,-30,11,-32,0r0,-184v0,-10,15,-6,25,-7v7,0,7,7,7,14","w":200,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":7,"f":7}},"o":{"d":"98,-201v63,1,83,46,80,116v-2,54,-26,87,-80,87v-62,1,-80,-47,-80,-115v0,-52,28,-88,80,-88xm98,-25v44,0,51,-40,49,-88v-1,-35,-14,-60,-49,-60v-44,0,-48,40,-48,88v0,40,16,60,48,60","w":196,"k":{"\u00fd":8,"\u00ff":8,"z":6,"y":8,"x":13,"w":6,"v":8,"t":11,"f":7}},"p":{"d":"26,-189v70,-29,161,-7,151,77v9,86,-35,129,-121,111r0,65v-1,9,-32,11,-32,0xm56,-28v50,12,89,0,89,-58v0,-47,-1,-89,-47,-88v-15,0,-28,2,-42,4r0,142","w":194,"k":{"\u00fd":7,"\u00ff":7,"y":7,"x":11,"w":5,"t":11,"f":7}},"q":{"d":"18,-86v-16,-100,62,-136,151,-104r1,254v-1,9,-28,10,-31,0r0,-65v-72,15,-125,-13,-121,-85xm50,-112v0,56,7,99,67,87r22,-3r0,-142r-42,-4v-37,0,-47,24,-47,62","w":194},"r":{"d":"24,-191v4,-13,39,-11,31,8v17,-12,34,-18,51,-18v11,0,6,13,7,22v0,4,-2,6,-7,6v-16,0,-33,5,-50,15r0,151v0,11,-30,11,-32,0r0,-184","w":123,"k":{"\u00e6":10,"\u00f5":9,"\u00f6":9,"\u00f4":9,"\u00f2":9,"\u00f3":9,"\u00eb":9,"\u00ea":9,"\u00e8":9,"\u00e9":9,"\u00e5":10,"\u00e3":10,"\u00e4":10,"\u00e2":10,"\u00e0":10,"\u00e1":10,"q":10,"o":9,"g":9,"e":9,"d":10,"c":9,"a":10,".":11,",":11}},"s":{"d":"140,-171v-41,0,-105,-14,-85,32v29,28,92,36,95,89v4,59,-77,55,-125,47v-10,-2,-11,-23,-1,-25v38,5,114,13,88,-36v-26,-30,-92,-36,-94,-89v-2,-58,70,-43,121,-43v10,0,11,25,1,25","w":167,"k":{"y":4,"v":5,"t":5,"f":4}},"t":{"d":"82,-46v-4,28,17,23,40,23v11,-1,7,9,8,18v-2,10,-20,6,-30,7v-37,1,-49,-10,-49,-48r0,-125v-16,-5,-48,6,-42,-21v3,-12,28,-4,42,-6v2,-14,-6,-37,6,-42v8,0,25,-9,25,3r0,39v19,4,52,-12,46,19v-3,16,-31,5,-46,8r0,125","w":138,"k":{"\u00f5":5,"\u00f6":5,"\u00f4":5,"\u00f2":5,"\u00f3":5,"\u00e7":4,"q":5,"o":5,"g":4,"d":4,"c":4}},"u":{"d":"144,-191v2,-11,32,-11,32,0r0,184v0,10,-15,6,-25,7v-7,0,-7,-7,-7,-14v-48,30,-120,21,-120,-58r0,-119v1,-10,32,-12,32,0r0,119v-5,56,49,55,88,33r0,-152","w":200},"v":{"d":"144,-191v3,-13,31,-9,33,-1r-49,174v-4,28,-58,26,-65,0r-49,-174v1,-9,30,-11,32,1r45,165v6,6,10,-2,12,-8","w":190,"k":{"\u00e6":8,"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e5":8,"\u00e3":8,"\u00e4":8,"\u00e2":8,"\u00e0":8,"\u00e1":8,"q":8,"o":8,"e":7,"a":8,".":18,",":18}},"w":{"d":"237,-192v3,-10,35,-10,32,3r-40,183v-5,11,-43,13,-48,0v-18,-42,-23,-99,-40,-142v-14,47,-23,103,-42,145v-17,9,-53,8,-50,-19r-35,-169v0,-10,30,-11,32,-1r30,164v0,6,5,5,6,0r35,-138v2,-16,45,-17,49,0r38,142v17,-50,20,-114,33,-168","w":283,"k":{"\u00f5":6,"\u00f6":6,"\u00f4":6,"\u00f2":6,"\u00f3":6,"\u00eb":5,"\u00ea":5,"\u00e8":5,"\u00e9":5,"o":6,"e":5,"c":6}},"x":{"d":"182,-8v3,3,2,9,-3,8v-10,-1,-25,4,-30,-3r-51,-75r-54,77v-7,1,-36,5,-28,-7r65,-93r-63,-93v4,-7,30,-7,36,1r46,68v19,-23,32,-52,53,-73v10,1,33,-4,24,9r-60,86","w":196,"k":{"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"\u00eb":13,"\u00ea":13,"\u00e8":13,"\u00e9":13,"q":13,"o":13,"g":13,"f":2,"e":13,"d":13,"c":10}},"y":{"d":"145,-193v6,-8,36,-10,33,4r-60,207v-10,34,-22,55,-65,53v-17,-1,-44,4,-38,-22v20,-17,72,14,75,-34r4,-15v-20,0,-26,-7,-32,-25r-48,-167v1,-9,29,-10,32,0r43,156v2,8,5,9,13,8","w":192,"k":{"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e7":9,"q":7,"o":8,"g":9,"e":7,"c":9,",":13}},"z":{"d":"148,-27v11,0,13,27,0,27r-108,0v-25,4,-27,-34,-14,-50r94,-119v-25,-6,-62,0,-91,-2v-9,0,-7,-11,-7,-20v0,-4,3,-7,7,-7r106,0v25,-2,24,31,12,46r-97,122v0,2,1,3,3,3r95,0","w":173,"k":{"\u00f5":6,"\u00f6":6,"\u00f4":6,"\u00f2":6,"\u00f3":6,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"q":4,"o":6,"e":7,"d":5,"c":4}},"{":{"d":"61,20v-10,42,53,2,49,43v-1,10,-16,7,-26,7v-39,0,-55,-10,-55,-50v0,-43,9,-94,-22,-108r0,-21v55,-24,-23,-173,77,-159v17,-2,30,0,25,20v-5,18,-57,-6,-48,30v-1,48,7,104,-26,120v34,17,25,70,26,118","w":119},"|":{"d":"29,-261v2,-11,32,-10,32,0r0,324v0,10,-15,6,-25,7v-4,0,-7,-3,-7,-7r0,-324","w":89},"}":{"d":"90,-218v0,43,-9,94,22,109r0,21v-54,23,22,173,-77,158v-16,1,-31,1,-25,-19v5,-19,57,7,48,-31v1,-48,-8,-102,26,-118v-33,-17,-26,-71,-26,-120v0,-28,-17,-22,-41,-23v-8,1,-7,-10,-7,-19v0,-10,14,-8,25,-8v39,0,55,10,55,50","w":119},"~":{"d":"167,-185v14,-2,20,2,18,17v5,42,-37,58,-67,36v-15,-11,-26,-27,-45,-32v-28,-7,3,38,-33,38v-7,0,-7,-8,-7,-17v0,-40,38,-60,67,-37v15,11,26,27,46,32v23,5,5,-34,21,-37"},"\u00c4":{"d":"44,-5v-5,9,-33,8,-34,-1r67,-237v5,-35,63,-35,73,0r67,237v-1,10,-28,9,-33,1r-24,-83r-93,0xm154,-117r-33,-118v-2,-9,-12,-9,-14,0r-33,118r80,0xm141,-334v9,0,21,-2,21,7v-1,18,8,41,-21,36v-11,-2,-12,-41,0,-43xm78,-334v10,0,22,-2,21,7v-1,19,8,42,-21,36v-13,-2,-5,-24,-7,-36v0,-3,3,-8,7,-7","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"t":16,"o":4,"f":16,"e":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"Q":9,"O":9,"G":8,"C":8}},"\u00c5":{"d":"114,-353v22,0,35,15,36,37v0,19,-16,37,-36,36v-22,-1,-37,-15,-37,-36v0,-21,15,-37,37,-37xm114,-297v9,0,19,-10,19,-19v0,-9,-9,-20,-19,-19v-10,-1,-19,10,-19,19v0,10,10,19,19,19xm44,-5v-5,9,-33,8,-34,-1r67,-237v5,-35,63,-35,73,0r67,237v-1,10,-28,9,-33,1r-24,-83r-93,0xm154,-117r-33,-118v-2,-9,-12,-9,-14,0r-33,118r80,0","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"t":16,"o":4,"f":16,"e":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"Q":9,"O":9,"G":8,"C":8}},"\u00c7":{"d":"54,-159v0,68,0,134,63,132r61,-3v9,0,5,13,6,21v-10,15,-41,10,-67,11v-84,3,-95,-70,-95,-161v0,-94,63,-127,155,-105v11,-1,4,15,6,23v0,3,-2,4,-5,4v-79,-11,-124,0,-124,78xm110,12v8,2,30,-4,26,5v-17,16,-29,38,-49,51v-7,-1,-29,3,-21,-6v14,-16,23,-40,44,-50","w":196,"k":{"\u00fd":8,"\u00d2":10,"\u00d4":10,"\u00d3":10,"\u00ff":8,"\u00d5":10,"\u00d8":10,"\u00d6":10,"y":8,"Q":10,"O":10}},"\u00c9":{"d":"61,-125v2,48,-15,98,44,98r70,0v7,1,6,24,0,28v-11,1,-34,1,-70,1v-51,1,-77,-18,-77,-67r0,-138v-5,-74,75,-71,147,-65v6,1,7,25,0,28v-46,5,-121,-19,-114,37r0,50r110,0v9,0,8,11,8,21v0,4,-5,7,-8,7r-110,0xm125,-342v9,1,36,-4,30,5v-17,16,-29,38,-49,51v-7,-1,-25,4,-21,-6","w":198},"\u00d1":{"d":"160,-329v4,-13,29,-9,23,8v4,36,-33,46,-57,30v-12,-9,-20,-22,-37,-25v-20,-3,2,37,-28,30v-6,0,-6,-7,-6,-14v-3,-34,32,-50,56,-30v12,9,21,21,38,25v11,0,11,-11,11,-24xm185,-261v2,-12,32,-10,32,0r0,251v0,15,-39,15,-45,4r-112,-212r0,211v0,11,-27,10,-32,3r0,-253v-1,-15,38,-16,45,-3r111,211","w":244},"\u00d6":{"d":"119,-270v83,0,101,67,97,159v-3,70,-29,112,-97,113v-85,1,-97,-69,-97,-159v0,-70,31,-113,97,-113xm55,-157v0,67,-1,130,64,130v59,0,66,-62,64,-130v-2,-50,-15,-83,-64,-83v-43,0,-64,27,-64,83xm144,-335v9,0,21,-2,21,7v-1,18,8,41,-21,36v-11,-2,-12,-41,0,-43xm81,-335v10,0,22,-2,21,7v-1,19,8,42,-21,36v-13,-2,-5,-24,-7,-36v0,-3,3,-8,7,-7","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"\u00dc":{"d":"178,-261v2,-12,33,-10,33,0v-6,113,33,263,-92,263v-125,0,-86,-150,-92,-263v0,-11,16,-6,26,-7v4,0,7,3,7,7r0,164v0,47,13,72,59,72v44,0,59,-25,59,-72r0,-164xm143,-335v9,0,21,-2,21,7v-1,18,8,41,-21,36v-11,-2,-12,-41,0,-43xm80,-335v10,0,22,-2,21,7v-1,19,8,42,-21,36v-13,-2,-5,-24,-7,-36v0,-3,3,-8,7,-7","w":238,"k":{"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"A":9}},"\u00e1":{"d":"131,-118v1,-35,-3,-56,-39,-55r-57,2v-9,1,-5,-11,-6,-18v0,-4,2,-6,7,-7v62,-13,126,-5,126,63r0,126v0,10,-13,7,-23,7v-7,0,-9,-7,-8,-15v-39,28,-114,25,-114,-45v0,-57,54,-60,114,-58xm49,-60v0,51,56,39,82,22r0,-58v-41,1,-82,-5,-82,36xm116,-280v9,1,36,-4,30,5v-17,16,-29,38,-49,51v-7,-1,-25,4,-21,-6","w":186,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":7,"t":9,"f":7}},"\u00e0":{"d":"131,-118v1,-35,-3,-56,-39,-55r-57,2v-9,1,-5,-11,-6,-18v0,-4,2,-6,7,-7v62,-13,126,-5,126,63r0,126v0,10,-13,7,-23,7v-7,0,-9,-7,-8,-15v-39,28,-114,25,-114,-45v0,-57,54,-60,114,-58xm49,-60v0,51,56,39,82,22r0,-58v-41,1,-82,-5,-82,36xm115,-230v3,1,2,7,-2,6v-11,-1,-24,3,-27,-6r-43,-48v7,-4,32,-5,37,3","w":186,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":7,"t":9,"f":7}},"\u00e2":{"d":"152,-230v2,1,1,7,-2,6v-33,5,-39,-26,-57,-41v-16,14,-27,52,-60,38v11,-19,26,-35,40,-52v13,-1,35,-5,44,4xm131,-118v1,-35,-3,-56,-39,-55r-57,2v-9,1,-5,-11,-6,-18v0,-4,2,-6,7,-7v62,-13,126,-5,126,63r0,126v0,10,-13,7,-23,7v-7,0,-9,-7,-8,-15v-39,28,-114,25,-114,-45v0,-57,54,-60,114,-58xm49,-60v0,51,56,39,82,22r0,-58v-41,1,-82,-5,-82,36","w":186,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":7,"t":9,"f":7}},"\u00e4":{"d":"131,-118v1,-35,-3,-56,-39,-55r-57,2v-9,1,-5,-11,-6,-18v0,-4,2,-6,7,-7v62,-13,126,-5,126,63r0,126v0,10,-13,7,-23,7v-7,0,-9,-7,-8,-15v-39,28,-114,25,-114,-45v0,-57,54,-60,114,-58xm49,-60v0,51,56,39,82,22r0,-58v-41,1,-82,-5,-82,36xm119,-274v9,0,21,-2,21,7v-1,18,8,41,-21,36v-11,-2,-12,-41,0,-43xm56,-274v10,0,22,-2,21,7v-1,19,8,42,-21,36v-13,-2,-5,-24,-7,-36v0,-3,3,-8,7,-7","w":186,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":7,"t":9,"f":7}},"\u00e3":{"d":"137,-271v6,-14,29,-9,23,8v4,35,-32,47,-56,30v-12,-9,-20,-22,-37,-25v-21,-4,3,37,-29,30v-6,0,-5,-8,-5,-14v-3,-34,32,-50,56,-30v12,9,21,21,38,25v11,0,10,-12,10,-24xm131,-118v1,-35,-3,-56,-39,-55r-57,2v-9,1,-5,-11,-6,-18v0,-4,2,-6,7,-7v62,-13,126,-5,126,63r0,126v0,10,-13,7,-23,7v-7,0,-9,-7,-8,-15v-39,28,-114,25,-114,-45v0,-57,54,-60,114,-58xm49,-60v0,51,56,39,82,22r0,-58v-41,1,-82,-5,-82,36","w":186,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":7,"t":9,"f":7}},"\u00e5":{"d":"92,-290v22,0,36,15,37,37v0,20,-17,37,-37,36v-21,-1,-36,-15,-36,-36v0,-21,15,-37,36,-37xm92,-234v10,0,20,-9,20,-19v1,-10,-10,-20,-20,-19v-10,-1,-19,9,-18,19v-1,10,9,19,18,19xm131,-118v1,-35,-3,-56,-39,-55r-57,2v-9,1,-5,-11,-6,-18v0,-4,2,-6,7,-7v62,-13,126,-5,126,63r0,126v0,10,-13,7,-23,7v-7,0,-9,-7,-8,-15v-39,28,-114,25,-114,-45v0,-57,54,-60,114,-58xm49,-60v0,51,56,39,82,22r0,-58v-41,1,-82,-5,-82,36","w":186,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":7,"t":9,"f":7}},"\u00e7":{"d":"95,-201v20,0,58,-8,52,25v0,5,-3,6,-8,6v-51,-8,-89,-4,-89,57v0,47,2,91,45,88r46,-3v9,0,5,11,6,19v-4,16,-36,11,-52,11v-62,2,-80,-48,-77,-115v2,-53,26,-88,77,-88xm88,12v8,1,33,-3,26,5v-16,17,-29,37,-48,51v-8,-1,-26,5,-22,-6v15,-16,24,-39,44,-50","w":162,"k":{"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"o":13}},"\u00e9":{"d":"50,-89v-10,73,59,60,116,60v9,0,4,15,4,23v-69,20,-161,8,-152,-78v-6,-69,17,-117,80,-117v58,1,83,40,79,104v0,5,-2,8,-7,8r-120,0xm145,-113v1,-38,-11,-60,-47,-60v-33,0,-49,21,-48,60r95,0xm124,-280v9,1,36,-4,30,5v-17,16,-29,38,-49,51v-7,-1,-25,4,-21,-6","w":195,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":7,"f":7}},"\u00e8":{"d":"50,-89v-10,73,59,60,116,60v9,0,4,15,4,23v-69,20,-161,8,-152,-78v-6,-69,17,-117,80,-117v58,1,83,40,79,104v0,5,-2,8,-7,8r-120,0xm145,-113v1,-38,-11,-60,-47,-60v-33,0,-49,21,-48,60r95,0xm127,-230v3,1,2,7,-2,6v-11,-1,-24,3,-27,-6r-43,-48v7,-4,32,-5,37,3","w":195,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":7,"f":7}},"\u00ea":{"d":"157,-230v2,1,1,7,-2,6v-33,5,-39,-26,-57,-41v-16,14,-27,52,-60,38r40,-52v13,-1,35,-5,44,4xm50,-89v-10,73,59,60,116,60v9,0,4,15,4,23v-69,20,-161,8,-152,-78v-6,-69,17,-117,80,-117v58,1,83,40,79,104v0,5,-2,8,-7,8r-120,0xm145,-113v1,-38,-11,-60,-47,-60v-33,0,-49,21,-48,60r95,0","w":195,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":7,"f":7}},"\u00eb":{"d":"50,-89v-10,73,59,60,116,60v9,0,4,15,4,23v-69,20,-161,8,-152,-78v-6,-69,17,-117,80,-117v58,1,83,40,79,104v0,5,-2,8,-7,8r-120,0xm145,-113v1,-38,-11,-60,-47,-60v-33,0,-49,21,-48,60r95,0xm124,-274v9,0,21,-2,21,7v-1,18,8,41,-21,36v-11,-2,-12,-41,0,-43xm61,-274v10,0,22,-2,21,7v-1,19,8,42,-21,36v-13,-2,-5,-24,-7,-36v0,-3,3,-8,7,-7","w":195,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":7,"f":7}},"\u00ed":{"d":"28,-191v2,-12,32,-10,32,0r0,184v0,11,-30,11,-32,0r0,-184xm66,-280v9,1,36,-4,30,5v-17,16,-29,38,-49,51v-7,-1,-25,4,-21,-6","w":88},"\u00ec":{"d":"28,-191v2,-12,32,-10,32,0r0,184v0,11,-30,11,-32,0r0,-184xm65,-230v3,1,2,7,-2,6v-11,-1,-24,3,-27,-6r-43,-48v7,-4,32,-5,37,3","w":88},"\u00ee":{"d":"103,-230v2,1,1,7,-2,6v-33,5,-39,-26,-57,-41v-16,14,-27,52,-60,38r40,-52v13,-1,35,-5,44,4xm28,-191v2,-12,32,-10,32,0r0,184v0,11,-30,11,-32,0r0,-184","w":88},"\u00ef":{"d":"28,-191v2,-12,32,-10,32,0r0,184v0,11,-30,11,-32,0r0,-184xm69,-274v9,0,21,-2,21,7v-1,18,8,41,-21,36v-11,-2,-12,-41,0,-43xm6,-274v10,0,22,-2,21,7v-1,19,8,42,-21,36v-13,-2,-5,-24,-7,-36v0,-3,3,-8,7,-7","w":88},"\u00f1":{"d":"149,-278v12,-1,19,1,17,15v4,36,-33,46,-57,30v-12,-9,-20,-22,-37,-25v-21,-4,3,36,-28,30v-7,0,-6,-7,-6,-14v-3,-34,32,-50,56,-30v12,9,21,22,38,25v18,3,4,-29,17,-31xm56,-184v47,-33,120,-19,120,58r0,119v0,11,-30,11,-32,0r0,-119v5,-56,-48,-55,-88,-33r0,152v0,11,-30,11,-32,0r0,-184v0,-10,15,-6,25,-7v7,0,7,7,7,14","w":200,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":8,"t":7}},"\u00f3":{"d":"98,-201v63,1,83,46,80,116v-2,54,-26,87,-80,87v-62,1,-80,-47,-80,-115v0,-52,28,-88,80,-88xm98,-25v44,0,51,-40,49,-88v-1,-35,-14,-60,-49,-60v-44,0,-48,40,-48,88v0,40,16,60,48,60xm121,-280v9,1,36,-4,30,5v-17,16,-29,38,-49,51v-7,-1,-25,4,-21,-6","w":196,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":13,"w":6,"v":8,"t":9}},"\u00f2":{"d":"98,-201v63,1,83,46,80,116v-2,54,-26,87,-80,87v-62,1,-80,-47,-80,-115v0,-52,28,-88,80,-88xm98,-25v44,0,51,-40,49,-88v-1,-35,-14,-60,-49,-60v-44,0,-48,40,-48,88v0,40,16,60,48,60xm117,-230v3,1,2,7,-2,6v-11,-1,-24,3,-27,-6r-43,-48v7,-4,32,-5,37,3","w":196,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":13,"w":6,"v":8,"t":9}},"\u00f4":{"d":"157,-230v2,1,1,7,-2,6v-34,5,-38,-26,-56,-41v-17,14,-27,52,-61,38r41,-52v13,-1,36,-6,44,4xm98,-201v63,1,83,46,80,116v-2,54,-26,87,-80,87v-62,1,-80,-47,-80,-115v0,-52,28,-88,80,-88xm98,-25v44,0,51,-40,49,-88v-1,-35,-14,-60,-49,-60v-44,0,-48,40,-48,88v0,40,16,60,48,60","w":196,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":13,"w":6,"v":8,"t":9}},"\u00f6":{"d":"98,-201v63,1,83,46,80,116v-2,54,-26,87,-80,87v-62,1,-80,-47,-80,-115v0,-52,28,-88,80,-88xm98,-25v44,0,51,-40,49,-88v-1,-35,-14,-60,-49,-60v-44,0,-48,40,-48,88v0,40,16,60,48,60xm122,-274v9,0,21,-2,21,7v-1,18,8,41,-21,36v-11,-2,-12,-41,0,-43xm59,-274v10,0,22,-2,21,7v-1,19,8,42,-21,36v-13,-2,-5,-24,-7,-36v0,-3,3,-8,7,-7","w":196,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":13,"w":6,"v":8,"t":9}},"\u00f5":{"d":"141,-271v5,-14,29,-9,23,8v4,36,-34,47,-57,30v-12,-8,-21,-20,-36,-25v-22,-3,2,37,-29,30v-6,0,-6,-7,-6,-14v0,-34,32,-50,56,-30v12,9,22,21,38,25v12,0,12,-11,11,-24xm98,-201v63,1,83,46,80,116v-2,54,-26,87,-80,87v-62,1,-80,-47,-80,-115v0,-52,28,-88,80,-88xm98,-25v44,0,51,-40,49,-88v-1,-35,-14,-60,-49,-60v-44,0,-48,40,-48,88v0,40,16,60,48,60","w":196,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":13,"w":6,"v":8,"t":9}},"\u00fa":{"d":"144,-191v2,-11,32,-11,32,0r0,184v0,10,-15,6,-25,7v-7,0,-7,-7,-7,-14v-48,30,-120,21,-120,-58r0,-119v1,-10,32,-12,32,0r0,119v-5,56,49,55,88,33r0,-152xm124,-280v9,1,36,-4,30,5v-17,16,-29,38,-49,51v-7,-1,-25,4,-21,-6","w":200},"\u00f9":{"d":"144,-191v2,-11,32,-11,32,0r0,184v0,10,-15,6,-25,7v-7,0,-7,-7,-7,-14v-48,30,-120,21,-120,-58r0,-119v1,-10,32,-12,32,0r0,119v-5,56,49,55,88,33r0,-152xm119,-230v3,1,2,7,-2,6v-11,-1,-24,3,-27,-6r-43,-48v7,-4,32,-5,37,3","w":200},"\u00fb":{"d":"159,-230v2,1,1,7,-2,6v-34,5,-38,-26,-56,-41v-17,13,-27,52,-60,38v13,-19,25,-40,44,-53v14,2,32,-5,40,5xm144,-191v2,-11,32,-11,32,0r0,184v0,10,-15,6,-25,7v-7,0,-7,-7,-7,-14v-48,30,-120,21,-120,-58r0,-119v1,-10,32,-12,32,0r0,119v-5,56,49,55,88,33r0,-152","w":200},"\u00fc":{"d":"144,-191v2,-11,32,-11,32,0r0,184v0,10,-15,6,-25,7v-7,0,-7,-7,-7,-14v-48,30,-120,21,-120,-58r0,-119v1,-10,32,-12,32,0r0,119v-5,56,49,55,88,33r0,-152xm125,-274v9,0,21,-2,21,7v-1,18,8,41,-21,36v-11,-2,-12,-41,0,-43xm62,-274v10,0,22,-2,21,7v-1,19,8,42,-21,36v-13,-2,-5,-24,-7,-36v0,-3,3,-8,7,-7","w":200},"\u00b0":{"d":"62,-270v29,0,51,22,51,51v0,29,-22,51,-51,51v-29,0,-52,-21,-52,-51v0,-29,23,-51,52,-51xm30,-219v0,44,65,38,64,0v-1,-17,-13,-31,-32,-31v-19,0,-32,13,-32,31","w":123},"\u00a2":{"d":"133,-200v17,3,46,-6,40,24v0,4,-2,6,-7,6v-67,-15,-90,12,-90,85v0,56,37,66,91,57v9,-2,5,11,6,19v-2,15,-26,8,-40,11v-1,20,8,45,-22,40v-14,-2,-6,-27,-8,-41v-79,-8,-81,-189,0,-200v1,-20,-9,-45,22,-40v13,2,6,25,8,39"},"\u00a3":{"d":"160,-153v12,1,10,29,0,28r-77,0v-1,40,5,70,-13,98r115,0v12,-2,7,12,8,21v0,4,-4,6,-8,6r-143,0v-10,1,-7,-18,-4,-25v16,-22,11,-61,12,-100v-17,2,-30,0,-25,-22v1,-9,16,-5,25,-6v-3,-70,12,-114,80,-114v18,0,41,2,56,5v11,-1,6,11,7,20v0,5,-3,8,-8,7v-22,-3,-40,-4,-55,-4v-51,0,-47,37,-47,86r77,0"},"\u00a7":{"d":"91,78v-22,-3,-74,11,-68,-27v1,-4,3,-6,8,-6v53,5,132,12,111,-55v-30,-49,-121,-48,-125,-123v0,-17,6,-25,13,-37v-8,-8,-13,-21,-13,-37v1,-48,35,-63,86,-63v22,6,80,-12,70,27v0,4,-3,6,-7,6v-47,-1,-132,-19,-111,45v33,46,121,47,125,123v0,15,-4,28,-11,39v29,54,-5,118,-78,108xm144,-53v14,-61,-60,-66,-92,-99v-17,61,57,69,92,99","w":196},"\u00b6":{"d":"16,-175v-2,-61,29,-93,85,-93r94,0v4,0,6,2,6,7r0,324v0,7,-7,7,-15,7v-4,0,-6,-3,-6,-7r0,-311r-21,0r0,311v0,7,-7,8,-14,7v-4,0,-7,-2,-6,-7r0,-158v-72,6,-121,-14,-123,-80","w":223},"\u00df":{"d":"146,-142v75,25,47,156,-42,144v-5,-1,-25,2,-24,-7v-2,-14,-1,-19,19,-19v40,0,60,-15,59,-58v-1,-35,-29,-49,-69,-46v-8,0,-9,-9,-8,-18v0,-9,12,-7,21,-7v33,0,51,-16,50,-49v-1,-29,-16,-43,-47,-43v-37,0,-49,23,-50,60r0,177v2,12,-15,7,-25,8v-5,1,-7,-5,-7,-8v8,-108,-36,-268,82,-265v50,1,81,24,79,76v0,26,-18,47,-38,55","w":209},"\u00ae":{"d":"108,-271v56,0,97,40,97,97v0,56,-41,96,-97,96v-56,0,-97,-40,-97,-96v0,-57,40,-97,97,-97xm108,-92v48,0,82,-34,82,-82v0,-48,-34,-83,-82,-83v-49,0,-82,35,-82,83v0,48,34,82,82,82xm74,-237v34,-3,75,-2,75,37v0,17,-8,28,-24,33r28,48v1,7,-8,5,-14,5v-23,-11,-16,-54,-53,-51v-4,18,12,54,-14,51v-2,0,-5,-3,-4,-6r0,-109v0,-5,2,-8,6,-8xm86,-180v23,0,46,1,45,-21v0,-21,-22,-20,-45,-20r0,41","w":215},"\u00a9":{"d":"135,-252v70,0,117,47,117,117v0,68,-50,117,-117,117v-68,0,-117,-49,-117,-117v0,-67,48,-117,117,-117xm135,-34v61,0,101,-40,101,-101v0,-59,-43,-102,-101,-102v-59,0,-102,43,-102,102v0,59,43,101,102,101xm167,-192v-54,-9,-71,12,-67,68v3,46,23,50,66,44v7,-1,5,8,5,14v-3,12,-22,8,-38,8v-46,0,-55,-38,-55,-90v0,-55,36,-75,88,-63v8,0,4,9,5,15v0,3,-1,4,-4,4","w":270},"\u00b4":{"d":"88,-280v9,1,36,-4,30,5v-17,16,-29,38,-49,51v-7,-1,-25,4,-21,-6","w":134},"\u00a8":{"d":"92,-274v9,0,21,-2,21,7v-1,18,8,41,-21,36v-11,-2,-12,-41,0,-43xm29,-274v10,0,22,-2,21,7v-1,19,8,42,-21,36v-13,-2,-5,-24,-7,-36v0,-3,3,-8,7,-7","w":134},"\u00c6":{"d":"182,-125v2,47,-13,107,45,98r58,0v9,0,6,22,1,27v-62,6,-145,8,-136,-65r0,-23r-86,0r-23,83v-4,7,-34,11,-34,-3r67,-232v5,-18,18,-28,37,-28r175,0v5,3,8,27,-1,29r-103,0r0,86r100,0v9,0,8,11,8,21v0,4,-5,7,-8,7r-100,0xm150,-117r0,-122v-16,2,-43,-7,-47,6r-33,116r80,0","w":309},"\u00d8":{"d":"37,-40v-32,-83,-27,-230,82,-230v28,0,49,8,66,23v8,-12,15,-27,39,-22v4,-1,5,4,3,7r-26,36v17,27,15,71,15,115v0,70,-29,112,-97,113v-28,0,-51,-7,-66,-22v-8,13,-15,27,-39,22v-5,1,-5,-3,-3,-6xm166,-221v-42,-40,-119,-16,-111,64v3,29,-2,61,4,85xm119,-27v77,0,68,-99,60,-168r-107,149v11,13,26,19,47,19","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"\u00b1":{"d":"184,-154v12,1,10,26,0,26r-62,0r0,62v1,11,-11,6,-20,7v-4,0,-6,-2,-6,-7r0,-62r-62,0v-11,1,-6,-11,-7,-20v0,-4,2,-6,7,-6r62,0r0,-62v-1,-11,11,-6,20,-7v4,0,6,2,6,7r0,62r62,0xm184,-21v12,0,10,26,0,23r-150,0v-10,1,-6,-9,-7,-17v0,-4,2,-6,7,-6r150,0"},"\u00a5":{"d":"198,-101v8,0,7,10,7,18v0,4,-3,7,-7,7r-72,0r0,69v0,11,-32,11,-34,0r0,-69r-72,0v-8,0,-7,-10,-7,-18v0,-4,3,-7,7,-7r72,0v-1,-21,-13,-31,-19,-47r-53,0v-8,0,-7,-10,-7,-18v4,-14,32,-4,47,-7v-14,-31,-32,-58,-44,-90v2,-8,30,-9,35,1r58,122r58,-122v2,-9,32,-10,35,0v-13,31,-30,59,-44,89v18,4,52,-12,47,17v0,5,-2,8,-7,8r-53,0v-6,16,-18,26,-19,47r72,0"},"\u00b5":{"d":"144,-191v2,-11,32,-11,32,0r0,175v-18,24,-91,23,-120,8r0,71v1,11,-14,6,-24,7v-3,0,-8,-3,-8,-7r0,-254v0,-10,15,-6,25,-7v4,0,7,3,7,7v7,64,-27,170,47,167v13,0,31,-2,41,-6r0,-161","w":200},"\u00aa":{"d":"23,-265v37,-9,72,-3,72,38r0,65v-4,12,-25,9,-39,10v-30,2,-46,-9,-45,-37v0,-31,27,-35,62,-34v3,-33,-19,-28,-50,-25v-6,0,-5,-6,-5,-12v0,-3,1,-5,5,-5xm32,-189v0,24,21,22,42,19r0,-37v-20,1,-42,-3,-42,18","w":108},"\u00ba":{"d":"58,-269v35,0,49,26,47,65v-1,32,-15,52,-47,52v-35,0,-46,-25,-46,-64v0,-32,15,-53,46,-53xm58,-170v23,0,26,-21,25,-46v0,-21,-6,-32,-25,-33v-24,0,-26,20,-25,45v0,20,6,34,25,34","w":115},"\u00e6":{"d":"211,-201v58,2,81,41,78,104v0,5,-2,8,-7,8r-120,0v-3,42,13,68,53,65r63,-5v10,0,6,15,5,23v-38,11,-110,16,-132,-13v-37,35,-134,30,-134,-41v0,-57,54,-60,114,-58v2,-35,-4,-56,-39,-55r-57,2v-9,1,-5,-11,-6,-18v0,-4,2,-6,7,-7v44,-8,99,-10,116,21v14,-17,34,-26,59,-26xm211,-173v-34,0,-50,24,-49,60v31,-2,69,4,96,-2v0,-35,-13,-59,-47,-58xm49,-60v0,43,57,44,82,26r0,-61v-41,1,-82,-6,-82,35","w":307},"\u00f8":{"d":"18,-113v0,-74,77,-111,130,-72v7,-12,20,-35,42,-22v-6,16,-19,25,-27,38v32,59,22,171,-65,171v-20,0,-37,-5,-50,-15v-8,12,-20,36,-42,23v6,-16,19,-25,27,-39v-15,-20,-15,-50,-15,-84xm130,-162v-34,-25,-85,-7,-80,49v2,19,-1,41,3,56xm98,-25v51,0,56,-66,45,-116r-77,105v8,8,18,11,32,11","w":196},"\u00bf":{"d":"87,-191v1,-13,32,-9,31,0v-1,21,8,48,-24,41v-13,-3,-5,-27,-7,-41xm54,14v-3,44,53,27,87,27v8,0,4,11,5,18v0,6,-1,8,-6,9v-64,13,-140,-1,-118,-72v13,-43,70,-56,65,-117v0,-10,14,-6,23,-7v14,4,7,41,2,53v-12,30,-56,49,-58,89","w":160,"k":{"Y":26,"V":22}},"\u00a1":{"d":"24,-191v1,-12,31,-10,31,0v-1,20,9,48,-24,41v-14,-2,-5,-28,-7,-41xm56,66v0,11,-16,6,-26,7v-4,0,-7,-3,-7,-7r3,-187v0,-9,11,-7,20,-7v4,0,7,3,7,7","w":78,"k":{"Y":20,"V":9}},"\u00ac":{"d":"179,-194v3,0,8,3,6,6r0,99v0,8,-10,7,-18,7v-3,0,-8,-3,-8,-7r0,-79r-119,0v-10,1,-8,-11,-8,-20v0,-4,3,-6,8,-6r139,0"},"\u00ab":{"d":"200,-33v2,2,4,9,-2,8v-11,-1,-23,2,-29,-4r-61,-61v-6,-5,-5,-15,0,-20r61,-61v6,-5,27,-5,33,0v-18,28,-46,46,-67,71xm76,-171v7,-5,28,-5,32,0v-18,28,-45,46,-66,71v21,25,47,45,66,72v-4,6,-26,5,-32,-1r-61,-61v-6,-5,-5,-15,0,-20","w":220},"\u00bb":{"d":"206,-110v6,5,5,16,0,20v-23,21,-42,47,-68,65v-9,-1,-33,2,-23,-8r64,-67v-21,-24,-47,-44,-66,-71v4,-6,26,-6,32,0xm113,-110v6,5,5,15,0,20v-24,21,-42,48,-69,65v-9,-1,-32,2,-22,-8r64,-67v-21,-24,-47,-44,-66,-71v4,-6,25,-4,32,0","w":220},"\u00a0":{},"\u00c0":{"d":"44,-5v-5,9,-33,8,-34,-1r67,-237v5,-35,63,-35,73,0r67,237v-1,10,-28,9,-33,1r-24,-83r-93,0xm154,-117r-33,-118v-2,-9,-12,-9,-14,0r-33,118r80,0xm137,-292v3,1,2,7,-2,6v-11,-1,-24,3,-27,-6r-43,-48v7,-4,32,-5,37,3","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"t":16,"o":4,"f":16,"e":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"Q":9,"O":9,"G":8,"C":8}},"\u00c3":{"d":"156,-330v6,-12,28,-8,23,8v5,36,-33,47,-57,30v-12,-9,-20,-22,-37,-25v-20,-3,2,37,-28,30v-6,0,-6,-7,-6,-14v-3,-34,31,-49,56,-30v12,9,21,21,38,25v11,0,11,-11,11,-24xm44,-5v-5,9,-33,8,-34,-1r67,-237v5,-35,63,-35,73,0r67,237v-1,10,-28,9,-33,1r-24,-83r-93,0xm154,-117r-33,-118v-2,-9,-12,-9,-14,0r-33,118r80,0","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"t":16,"o":4,"f":16,"e":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"Q":9,"O":9,"G":8,"C":8}},"\u00d5":{"d":"161,-330v6,-12,28,-8,23,8v5,36,-34,47,-57,30v-12,-8,-20,-22,-36,-25v-21,-4,2,36,-29,30v-6,0,-6,-7,-6,-14v0,-34,32,-49,56,-30v12,9,21,21,38,25v11,0,11,-11,11,-24xm119,-270v83,0,101,67,97,159v-3,70,-29,112,-97,113v-85,1,-97,-69,-97,-159v0,-70,31,-113,97,-113xm55,-157v0,67,-1,130,64,130v59,0,66,-62,64,-130v-2,-50,-15,-83,-64,-83v-43,0,-64,27,-64,83","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"\u00f7":{"d":"93,-221v0,-11,31,-10,31,0v-1,20,7,46,-24,39v-12,-2,-7,-25,-7,-39xm178,-154v12,1,10,26,0,26r-138,0v-11,1,-7,-11,-8,-20v0,-4,3,-6,8,-6r138,0xm93,-90v1,-12,31,-10,31,0v-1,20,7,45,-24,38v-13,0,-5,-25,-7,-38"},"\u00ff":{"d":"145,-193v6,-8,36,-10,33,4r-60,207v-10,34,-22,55,-65,53v-17,-1,-44,4,-38,-22v20,-17,72,14,75,-34r4,-15v-20,0,-26,-7,-32,-25r-48,-167v1,-9,29,-10,32,0r43,156v2,8,5,9,13,8xm124,-274v9,0,21,-2,21,7v-1,18,8,41,-21,36v-11,-2,-12,-41,0,-43xm61,-274v10,0,22,-2,21,7v-1,19,8,42,-21,36v-13,-2,-5,-24,-7,-36v0,-3,3,-8,7,-7","w":192,"k":{"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e7":9,"o":8,"e":7,"c":9}},"\u20ac":{"d":"38,-173v0,-81,76,-111,155,-91v11,-1,4,15,6,23v0,3,-3,4,-6,4v-73,-9,-115,-2,-122,64r104,0v10,-1,5,11,4,17v-1,5,-4,7,-8,7r-101,0r0,29r93,0v8,2,4,25,-5,25r-88,0v5,63,53,75,124,65v9,-1,5,13,6,21v-11,15,-35,11,-62,11v-61,0,-97,-36,-100,-97v-19,7,-27,-19,-12,-25r11,0r0,-29v-18,7,-26,-18,-11,-24r12,0"},"\u00c2":{"d":"174,-292v2,1,3,7,-2,6v-34,5,-39,-25,-56,-40v-17,14,-25,49,-60,38v10,-21,27,-35,40,-53v13,-1,36,-6,44,4xm44,-5v-5,9,-33,8,-34,-1r67,-237v5,-35,63,-35,73,0r67,237v-1,10,-28,9,-33,1r-24,-83r-93,0xm154,-117r-33,-118v-2,-9,-12,-9,-14,0r-33,118r80,0","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"t":16,"o":4,"f":16,"e":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"Q":9,"O":9,"G":8,"C":8}},"\u00ca":{"d":"163,-292v1,1,2,7,-2,6v-34,5,-39,-25,-57,-40v-16,15,-25,49,-60,38v14,-19,24,-42,45,-54v14,2,32,-5,39,5xm61,-125v2,48,-15,98,44,98r70,0v7,1,6,24,0,28v-11,1,-34,1,-70,1v-51,1,-77,-18,-77,-67r0,-138v-5,-74,75,-71,147,-65v6,1,7,25,0,28v-46,5,-121,-19,-114,37r0,50r110,0v9,0,8,11,8,21v0,4,-5,7,-8,7r-110,0","w":198},"\u00c1":{"d":"44,-5v-5,9,-33,8,-34,-1r67,-237v5,-35,63,-35,73,0r67,237v-1,10,-28,9,-33,1r-24,-83r-93,0xm154,-117r-33,-118v-2,-9,-12,-9,-14,0r-33,118r80,0xm137,-342v9,1,36,-4,30,5v-17,16,-29,38,-49,51v-7,-1,-25,4,-21,-6","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"t":16,"o":4,"f":16,"e":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"Q":9,"O":9,"G":8,"C":8}},"\u00cb":{"d":"61,-125v2,48,-15,98,44,98r70,0v7,1,6,24,0,28v-11,1,-34,1,-70,1v-51,1,-77,-18,-77,-67r0,-138v-5,-74,75,-71,147,-65v6,1,7,25,0,28v-46,5,-121,-19,-114,37r0,50r110,0v9,0,8,11,8,21v0,4,-5,7,-8,7r-110,0xm132,-335v9,0,21,-2,21,7v-1,18,8,41,-21,36v-11,-2,-12,-41,0,-43xm69,-335v10,0,22,-2,21,7v-1,19,8,42,-21,36v-13,-2,-5,-24,-7,-36v0,-3,3,-8,7,-7","w":198},"\u00c8":{"d":"61,-125v2,48,-15,98,44,98r70,0v7,1,6,24,0,28v-11,1,-34,1,-70,1v-51,1,-77,-18,-77,-67r0,-138v-5,-74,75,-71,147,-65v6,1,7,25,0,28v-46,5,-121,-19,-114,37r0,50r110,0v9,0,8,11,8,21v0,4,-5,7,-8,7r-110,0xm128,-291v3,1,2,7,-2,6v-11,-1,-24,3,-27,-6r-43,-48v7,-4,32,-5,37,3","w":198},"\u00cd":{"d":"32,-261v2,-12,33,-10,33,0r0,254v0,11,-17,6,-27,7v-4,0,-6,-3,-6,-7r0,-254xm66,-342v9,1,36,-4,30,5v-17,16,-29,38,-49,51v-7,-1,-25,4,-21,-6","w":96},"\u00ce":{"d":"105,-292v2,1,3,7,-2,6v-34,5,-39,-25,-56,-40v-17,14,-25,49,-60,38v10,-21,27,-35,40,-53v13,-1,36,-6,44,4xm32,-261v2,-12,33,-10,33,0r0,254v0,11,-17,6,-27,7v-4,0,-6,-3,-6,-7r0,-254","w":96},"\u00cf":{"d":"32,-261v2,-12,33,-10,33,0r0,254v0,11,-17,6,-27,7v-4,0,-6,-3,-6,-7r0,-254xm73,-334v9,0,21,-2,21,7v-1,18,8,41,-21,36v-11,-2,-12,-41,0,-43xm10,-334v10,0,22,-2,21,7v-1,19,8,42,-21,36v-13,-2,-5,-24,-7,-36v0,-3,3,-8,7,-7","w":96},"\u00cc":{"d":"32,-261v2,-12,33,-10,33,0r0,254v0,11,-17,6,-27,7v-4,0,-6,-3,-6,-7r0,-254xm70,-292v3,1,2,7,-2,6v-11,-1,-24,3,-27,-6r-43,-48v7,-4,32,-5,37,3","w":96},"\u00d3":{"d":"119,-270v83,0,101,67,97,159v-3,70,-29,112,-97,113v-85,1,-97,-69,-97,-159v0,-70,31,-113,97,-113xm55,-157v0,67,-1,130,64,130v59,0,66,-62,64,-130v-2,-50,-15,-83,-64,-83v-43,0,-64,27,-64,83xm133,-342v9,1,36,-4,30,5v-17,16,-29,38,-49,51v-7,-1,-25,4,-21,-6","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"\u00d4":{"d":"178,-292v2,1,1,7,-2,6v-33,5,-39,-26,-57,-41v-16,14,-27,52,-60,38v11,-20,27,-35,40,-53v16,2,36,-5,44,5xm119,-270v83,0,101,67,97,159v-3,70,-29,112,-97,113v-85,1,-97,-69,-97,-159v0,-70,31,-113,97,-113xm55,-157v0,67,-1,130,64,130v59,0,66,-62,64,-130v-2,-50,-15,-83,-64,-83v-43,0,-64,27,-64,83","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"\u00d2":{"d":"119,-270v83,0,101,67,97,159v-3,70,-29,112,-97,113v-85,1,-97,-69,-97,-159v0,-70,31,-113,97,-113xm55,-157v0,67,-1,130,64,130v59,0,66,-62,64,-130v-2,-50,-15,-83,-64,-83v-43,0,-64,27,-64,83xm141,-292v3,1,2,7,-2,6v-11,-1,-24,3,-27,-6r-43,-48v7,-4,32,-5,37,3","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"\u00da":{"d":"178,-261v2,-12,33,-10,33,0v-6,113,33,263,-92,263v-125,0,-86,-150,-92,-263v0,-11,16,-6,26,-7v4,0,7,3,7,7r0,164v0,47,13,72,59,72v44,0,59,-25,59,-72r0,-164xm140,-342v9,1,36,-4,30,5v-17,16,-29,38,-49,51v-7,-1,-25,4,-21,-6","w":238,"k":{"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"A":9}},"\u00db":{"d":"176,-292v2,1,4,7,-1,6v-34,5,-39,-25,-57,-40v-17,14,-25,49,-60,38v10,-21,27,-35,40,-53v13,-1,36,-6,44,4xm178,-261v2,-12,33,-10,33,0v-6,113,33,263,-92,263v-125,0,-86,-150,-92,-263v0,-11,16,-6,26,-7v4,0,7,3,7,7r0,164v0,47,13,72,59,72v44,0,59,-25,59,-72r0,-164","w":238,"k":{"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"A":9}},"\u00d9":{"d":"178,-261v2,-12,33,-10,33,0v-6,113,33,263,-92,263v-125,0,-86,-150,-92,-263v0,-11,16,-6,26,-7v4,0,7,3,7,7r0,164v0,47,13,72,59,72v44,0,59,-25,59,-72r0,-164xm139,-292v3,1,2,7,-2,6v-11,-1,-24,3,-27,-6r-43,-48v7,-4,32,-5,37,3","w":238,"k":{"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"A":9}},"\u00b8":{"d":"59,12v10,1,35,-5,31,5v-17,16,-29,38,-49,51v-8,-1,-28,3,-21,-6","w":131},"\u00a6":{"d":"29,-255v2,-12,32,-10,32,0r0,125v0,10,-16,6,-26,7v-4,1,-6,-4,-6,-7r0,-125xm29,-56v2,-12,32,-10,32,0r0,125v0,11,-16,6,-26,7v-4,0,-6,-3,-6,-7r0,-125","w":89},"\u00d0":{"d":"51,-268v95,-12,159,17,159,110v0,118,-36,177,-159,159v-9,-1,-23,-1,-23,-11r0,-115v-16,2,-21,-2,-21,-21v0,-9,12,-7,21,-7r0,-104v0,-10,14,-10,23,-11xm61,-26v66,8,117,-12,117,-84v0,-75,-6,-135,-77,-132v-15,0,-28,0,-40,1r0,88v20,3,51,-11,44,21v-3,14,-30,4,-44,7r0,99","w":230},"\u00f0":{"d":"108,-250v54,27,70,77,70,162v0,56,-26,90,-79,90v-63,1,-81,-42,-81,-109v0,-74,66,-111,121,-77v-10,-23,-29,-38,-53,-50v-14,8,-35,39,-47,15v5,-10,18,-15,26,-23v-20,-5,-48,-12,-25,-32r48,14v15,-8,36,-40,50,-16v-7,10,-21,17,-30,26xm99,-25v43,0,50,-36,48,-82v-1,-37,-12,-63,-49,-63v-44,-1,-49,36,-48,82v1,38,13,63,49,63","w":196},"\u00dd":{"d":"163,-262v4,-10,33,-9,35,0r-57,129v-6,13,-13,20,-20,23r0,103v0,11,-16,6,-26,7v-4,0,-7,-2,-6,-7r0,-103v-7,-3,-14,-10,-20,-23r-56,-129v0,-10,31,-8,34,0r50,116v5,13,11,13,16,0xm126,-342v9,1,36,-4,30,5v-17,16,-29,38,-49,51v-7,-1,-25,4,-21,-6","w":209,"k":{"\u00fd":20,"\u00d2":14,"\u00d4":14,"\u00d3":14,"\u00c8":10,"\u00cb":10,"\u00c1":31,"\u00ca":10,"\u00c2":31,"\u00ff":20,"\u00d5":14,"\u00c3":31,"\u00c0":31,"\u00e6":31,"\u00d8":14,"\u00c6":31,"\u00fc":26,"\u00fb":26,"\u00f9":26,"\u00fa":26,"\u00f5":35,"\u00f6":35,"\u00f4":35,"\u00f2":35,"\u00f3":35,"\u00eb":34,"\u00ea":34,"\u00e8":34,"\u00e9":34,"\u00e5":31,"\u00e3":31,"\u00e4":31,"\u00e2":31,"\u00e0":31,"\u00e1":31,"\u00d6":14,"\u00c9":10,"\u00c7":16,"\u00c5":31,"\u00c4":31,"y":20,"v":21,"u":26,"o":35,"e":34,"a":31,"Q":14,"O":14,"E":10,"C":16,"A":31}},"\u00fd":{"d":"145,-193v6,-8,36,-10,33,4r-60,207v-10,34,-22,55,-65,53v-17,-1,-44,4,-38,-22v20,-17,72,14,75,-34r4,-15v-20,0,-26,-7,-32,-25r-48,-167v1,-9,29,-10,32,0r43,156v2,8,5,9,13,8xm129,-280v9,1,36,-4,30,5v-17,16,-29,38,-49,51v-7,-1,-25,4,-21,-6","w":192,"k":{"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e7":9,"o":8,"e":7,"c":9}},"\u00de":{"d":"28,-261v2,-12,32,-11,32,0r0,25v79,-7,137,13,137,83v0,66,-60,88,-137,80r0,66v1,12,-16,6,-25,7v-4,0,-7,-3,-7,-7r0,-254xm60,-101v61,4,105,2,105,-57v0,-53,-51,-51,-105,-50r0,107","w":213},"\u00fe":{"d":"56,-197v82,-18,121,21,121,111v0,72,-48,100,-121,85r0,65v-1,9,-32,11,-32,0r0,-327v1,-10,14,-8,25,-8v5,0,7,3,7,8r0,66xm56,-28v50,12,89,0,89,-58v0,-47,-1,-89,-47,-88v-15,0,-28,2,-42,4r0,142","w":194},"\u00d7":{"d":"173,-93v8,8,-10,25,-18,18r-48,-47v-18,16,-32,36,-53,50v-7,-4,-22,-13,-13,-22r48,-47v-17,-18,-37,-32,-51,-53v5,-6,12,-19,22,-13r47,48v18,-17,33,-36,53,-51v7,4,22,13,13,22r-48,47"},"\u00b9":{"d":"16,-250v11,-9,37,-25,53,-14r0,140v0,7,-21,7,-23,0r0,-121v-10,2,-21,14,-30,10r0,-15","w":101},"\u00b2":{"d":"18,-262v34,-23,114,-1,83,50v-15,25,-66,29,-63,71r63,0v8,0,4,10,5,17v0,2,-2,4,-5,4r-81,0v-19,-45,28,-79,58,-98v12,-16,3,-37,-23,-32v-12,-1,-29,7,-37,0r0,-12","w":122},"\u00b3":{"d":"20,-266v36,-9,86,-7,86,36v0,15,-6,25,-18,32v34,20,14,87,-35,78v-16,-2,-40,3,-37,-19v15,-12,67,16,67,-28v0,-27,-32,-22,-58,-22v-7,0,-3,-10,-4,-15v12,-14,66,11,62,-27v-2,-26,-36,-17,-63,-16v-6,0,-4,-10,-4,-15v0,-2,1,-4,4,-4","w":121},"\u00bd":{"d":"166,-140v28,-14,92,-15,89,28v-3,48,-68,41,-69,91r63,0v8,0,4,10,5,17v0,2,-2,4,-5,4r-81,0v-18,-37,19,-76,48,-88v11,-9,15,-9,16,-24v2,-29,-48,-8,-66,-17r0,-11xm186,-266v7,-3,29,-6,24,5r-155,261v-6,1,-30,5,-24,-6xm16,-250v11,-9,37,-25,53,-14r0,140v0,7,-21,7,-23,0r0,-121v-10,2,-21,14,-30,10r0,-15","w":271},"\u00bc":{"d":"234,-56v12,-1,22,-1,19,15v-1,7,-12,3,-19,4v-2,18,9,44,-19,37v-9,-5,-2,-25,-4,-37r-56,0v-8,-2,-4,-21,-2,-29r59,-81v7,1,21,-4,22,4r0,87xm186,-266v7,-3,29,-6,24,5r-155,261v-6,1,-30,5,-24,-6xm16,-250v11,-9,37,-25,53,-14r0,140v0,7,-21,7,-23,0r0,-121v-10,2,-21,14,-30,10r0,-15xm211,-56v-1,-19,2,-41,-1,-58r-40,56v9,5,28,1,41,2","w":268},"\u00be":{"d":"262,-56v13,-1,22,-2,19,15v-1,7,-13,3,-19,4v-2,18,9,44,-19,37v-9,-5,-2,-25,-4,-37r-55,0v-10,-1,-5,-21,-3,-29r60,-81v7,1,20,-4,21,4r0,87xm214,-266v7,-4,31,-6,24,5r-154,261v-6,2,-31,5,-24,-6xm20,-266v36,-9,86,-7,86,36v0,15,-6,25,-18,32v34,20,14,87,-35,78v-16,-2,-40,3,-37,-19v15,-12,67,16,67,-28v0,-27,-32,-22,-58,-22v-7,0,-3,-10,-4,-15v12,-14,66,11,62,-27v-2,-26,-36,-17,-63,-16v-6,0,-4,-10,-4,-15v0,-2,1,-4,4,-4xm239,-56r0,-58r-40,56v9,5,27,1,40,2","w":297},"\u00ad":{"d":"96,-119v9,0,7,12,7,21v0,4,-3,6,-7,6r-72,0v-11,1,-6,-11,-7,-20v0,-4,3,-7,7,-7r72,0","w":119},"\u00af":{"d":"182,-305v8,-1,7,7,7,14v0,4,-2,6,-7,6r-186,0v-9,1,-7,-7,-7,-15v0,-4,3,-5,7,-5r186,0","w":177},"\u00b7":{"d":"23,-158v1,-12,31,-10,31,0v-1,20,9,48,-24,41v-14,-2,-5,-28,-7,-41","w":76},"\u00a4":{"d":"176,-220v11,-6,24,9,19,19r-30,29v16,21,16,55,0,76v14,15,48,37,16,51v-14,-9,-23,-23,-35,-33v-22,16,-53,16,-74,0v-15,13,-38,48,-51,16v8,-13,22,-22,32,-34v-15,-21,-17,-54,-1,-75v-13,-14,-47,-37,-16,-51v14,7,23,22,34,32v22,-16,54,-16,77,0xm108,-91v25,0,44,-18,44,-43v0,-25,-19,-42,-44,-43v-24,-1,-43,20,-43,43v0,24,19,43,43,43"}}});
/*!
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * Digitized data (C) 2004 Agfa Monotype Corporation. Neo Sans(TM) is a trademark
 * of Agfa Monotype Corporation and may be registered in certain jurisdictions. 
 * All rights reserved. Neo Sans is designed by Sebastian Lester.
 * 
 * Trademark:
 * Neo Sans(TM) is a trademark of Agfa Monotype Corporation and may be registered
 * in certain jurisdictions.
 * 
 * Manufacturer:
 * Agfa Monotype Corporation
 * 
 * Designer:
 * Sebastian Lester
 * 
 * Vendor URL:
 * http://www.agfamonotype.com
 * 
 * License information:
 * http://www.agfamonotype.com/html/type/license.html
 */
Cufon.registerFont({"w":232,"face":{"font-family":"Neo Sans","font-weight":700,"font-stretch":"normal","units-per-em":"360","panose-1":"2 11 8 4 2 2 2 2 2 4","ascent":"288","descent":"-72","x-height":"3","bbox":"-20 -364 314.319 78.4092","underline-thickness":"17.9297","underline-position":"-27.0703","unicode-range":"U+0020-U+20AC"},"glyphs":{" ":{"w":93},"!":{"d":"27,-276v17,3,48,-7,52,7r-7,180v-2,11,-41,12,-46,0r-7,-180v0,-4,5,-7,8,-7xm28,-59v16,2,43,-6,49,6v-3,17,8,48,-7,53v-16,-3,-44,7,-49,-7v3,-17,-7,-47,7,-52","w":98},"\"":{"d":"157,-276v4,-1,7,4,4,7r-27,79v-6,13,-28,3,-43,6v-3,0,-3,-3,-3,-6r19,-79v5,-15,34,-4,50,-7xm78,-276v5,0,6,3,4,7r-30,84v-11,0,-39,7,-43,-5r19,-79v6,-15,33,-4,50,-7","w":169,"k":{".":27,",":27}},"#":{"d":"197,-199v12,2,34,-6,37,6v-3,10,1,28,-9,31r-31,0r-5,58v12,2,35,-6,36,6v-3,10,0,26,-9,31r-31,0r-5,60v-3,15,-29,4,-43,7v-4,0,-6,-2,-6,-7r5,-60r-40,0r-6,60v-3,14,-29,4,-43,7v-4,-1,-6,-3,-6,-7r5,-60v-12,-2,-34,6,-36,-6v4,-10,0,-27,10,-31r30,0r5,-58v-12,-2,-33,6,-36,-5v4,-11,-1,-32,10,-32r29,0r5,-62v4,-13,29,-5,44,-7v4,0,6,3,6,7r-6,62r41,0r6,-62v3,-15,29,-4,43,-7v4,0,6,3,6,7xm145,-162r-41,0r-5,58r41,0","w":251},"$":{"d":"193,-214v-39,3,-98,-19,-105,15v25,52,122,42,119,123v-2,45,-27,68,-67,76v-2,14,6,40,-7,41v-16,-2,-47,7,-47,-7r0,-32v-18,-3,-45,0,-53,-14v3,-14,-7,-42,8,-42v33,0,123,19,96,-34v-36,-35,-111,-42,-112,-113v0,-38,20,-60,61,-67v2,-14,-5,-37,7,-38v16,2,47,-7,47,7r0,29v21,4,52,-1,60,14v-2,14,7,41,-7,42"},"%":{"d":"235,-149v46,-1,53,37,53,89v0,40,-16,62,-53,62v-46,0,-53,-38,-53,-89v0,-39,17,-61,53,-62xm248,-268v4,0,3,5,2,8r-154,259v-11,3,-28,0,-41,1v-5,1,-5,-5,-3,-8r150,-252v6,-15,29,-5,46,-8xm67,-269v48,0,53,38,53,88v0,39,-16,62,-53,62v-47,0,-53,-39,-53,-89v0,-39,16,-61,53,-61xm235,-29v23,0,17,-34,17,-58v0,-20,-2,-30,-17,-30v-23,0,-17,34,-17,57v0,18,3,31,17,31xm67,-150v23,0,17,-34,17,-58v0,-20,-2,-29,-17,-30v-24,-1,-17,34,-17,57v0,18,2,30,17,31","w":301},"&":{"d":"239,-129v0,35,-6,60,-21,82v13,15,29,26,39,43v0,3,-1,4,-4,4v-26,-1,-59,7,-68,-14v-55,32,-172,23,-167,-56v2,-38,23,-53,48,-70v-18,-24,-35,-35,-35,-68v0,-44,35,-63,85,-63v72,0,108,70,60,114v-8,8,-24,18,-36,26r47,50v4,-13,6,-28,6,-48v1,-14,27,-4,40,-7v4,0,7,2,6,7xm116,-230v-45,0,-35,48,-9,65v18,-13,39,-17,38,-43v0,-15,-12,-22,-29,-22xm99,-105v-34,13,-26,67,19,67v14,0,26,-3,36,-9","w":263},"'":{"d":"78,-276v5,0,6,3,4,7r-30,84v-11,0,-39,7,-43,-5r19,-79v6,-15,33,-4,50,-7","w":91,"k":{".":27,",":27}},"(":{"d":"77,-102v0,72,18,120,41,168v-8,8,-42,6,-52,-1v-63,-73,-63,-253,0,-327v8,-9,32,-5,48,-6v3,0,4,2,4,4v-21,45,-41,95,-41,162","w":129,"k":{"j":-13}},")":{"d":"53,-95v0,-71,-19,-121,-41,-169v8,-8,44,-7,53,2v64,70,61,257,0,327v-9,9,-32,4,-49,5v-3,0,-4,-2,-4,-4v21,-46,41,-94,41,-161","w":129},"*":{"d":"144,-233v12,-3,22,30,11,33r-42,12v7,15,28,28,26,45v-9,4,-20,23,-28,11r-25,-36v-11,12,-16,37,-33,39v-6,-7,-28,-11,-20,-23r26,-36v-14,-7,-43,-6,-46,-19v5,-8,3,-30,15,-26r42,14v2,-16,-8,-45,5,-51v11,2,29,-6,29,8r-1,43","w":172},"+":{"d":"199,-163v13,2,5,25,7,38v0,4,-2,6,-7,6r-61,0r0,61v-1,14,-26,4,-38,7v-4,0,-6,-2,-6,-7r0,-61r-61,0v-14,-1,-4,-26,-7,-38v10,-14,47,-2,68,-6r0,-61v1,-14,26,-4,38,-7v4,0,6,2,6,7r0,61r61,0"},",":{"d":"48,28v-4,12,-42,11,-45,1v10,-26,14,-56,24,-82v5,-14,35,-2,51,-6v5,-1,6,3,4,6","w":98,"k":{"*":27,"'":27,"\"":27}},"-":{"d":"89,-131v13,1,6,23,8,36v-1,4,-3,6,-8,6r-69,0v-15,1,-6,-23,-8,-35v0,-5,3,-7,8,-7r69,0","w":108},".":{"d":"28,-59v16,3,45,-7,50,6v-3,17,8,49,-8,53v-16,-3,-45,7,-49,-7v3,-17,-8,-48,7,-52","w":98,"k":{"*":27,"'":27,"\"":27}},"\/":{"d":"89,-268v16,3,51,-7,51,8r-75,252v-6,16,-35,5,-53,8v-4,0,-7,-3,-7,-8r76,-252v1,-5,4,-8,8,-8","w":145,"k":{"q":12,"o":12,"e":18,"c":20,"4":16,"\/":5}},"0":{"d":"19,-118v-3,-89,16,-153,97,-153v75,0,97,60,97,153v0,77,-27,121,-97,121v-71,0,-95,-44,-97,-121xm116,-48v41,0,36,-56,36,-101v0,-38,-4,-71,-36,-71v-41,0,-34,56,-35,102v0,38,2,70,35,70"},"1":{"d":"105,-266v14,-2,44,-8,48,5r0,254v-5,15,-37,4,-54,7v-3,0,-8,-3,-8,-7r0,-199r-44,18v-9,-8,-5,-39,-1,-51"},"2":{"d":"37,-260v64,-19,171,-24,168,58v-3,86,-113,75,-124,151r114,0v14,3,4,30,7,44v1,4,-4,7,-7,7r-160,0v-15,-2,-8,-29,-8,-44v0,-81,78,-102,117,-143v9,-52,-50,-33,-108,-30v-9,-4,-13,-39,1,-43"},"3":{"d":"172,-137v19,10,32,31,32,61v0,83,-98,90,-169,69v-13,-4,-4,-23,-7,-36v0,-4,3,-6,8,-6v43,0,107,21,107,-34v0,-46,-54,-27,-93,-31v-10,-3,-10,-38,0,-44v42,-2,100,13,93,-37v-7,-44,-55,-23,-107,-22v-11,-2,-12,-39,0,-43v70,-22,174,-20,168,68v-2,26,-16,44,-32,55"},"4":{"d":"187,-108v12,1,32,-5,31,8v-1,14,6,40,-7,40r-24,0r0,53v-5,15,-37,4,-54,7v-4,0,-7,-3,-7,-7r0,-53r-104,0v-14,-4,-9,-39,-4,-53r114,-149v8,-11,31,-4,48,-6v4,1,7,4,7,8r0,152xm127,-108r-1,-81v-19,27,-41,51,-58,80v17,3,40,0,59,1"},"5":{"d":"86,-168v70,-1,118,15,118,83v0,88,-90,99,-168,78v-14,-4,-6,-23,-8,-37v0,-4,3,-6,8,-6v45,1,106,21,106,-38v0,-47,-63,-30,-107,-33v-3,1,-6,-2,-5,-5r11,-135v1,-4,3,-6,7,-7r140,0v14,3,4,29,7,43v0,4,-3,7,-7,7r-98,0"},"6":{"d":"81,-167v67,-13,134,5,131,79v-3,58,-35,91,-95,91v-84,0,-96,-69,-96,-161v0,-102,77,-128,171,-105v15,4,5,25,8,39v0,6,-4,7,-9,7v-52,-5,-120,-19,-110,50xm117,-44v27,0,35,-16,35,-47v0,-40,-33,-41,-71,-34v0,40,-4,81,36,81"},"7":{"d":"192,-268v18,4,14,38,6,55r-94,206v-8,15,-39,3,-59,7v-6,1,-7,-4,-5,-8r98,-208v-28,-6,-70,1,-102,-2v-15,-1,-6,-28,-8,-43v0,-4,5,-7,8,-7r156,0","k":{"\/":40,".":43,",":43}},"8":{"d":"183,-139v18,13,31,32,30,62v0,57,-41,80,-99,80v-57,-1,-95,-25,-95,-84v0,-26,14,-46,30,-58v-20,-14,-30,-32,-29,-58v2,-54,41,-75,98,-74v56,1,96,22,94,78v0,23,-9,41,-29,54xm111,-160v28,0,45,-8,44,-33v0,-23,-15,-33,-41,-33v-24,0,-36,11,-36,35v0,19,12,31,33,31xm114,-42v27,0,41,-14,40,-40v0,-23,-14,-35,-43,-35v-22,0,-34,17,-33,39v0,22,13,36,36,36"},"9":{"d":"115,-271v84,0,97,69,97,161v0,101,-74,130,-171,106v-15,-3,-8,-25,-8,-39v0,-5,3,-8,8,-8v49,6,122,19,111,-50v-70,14,-131,-4,-131,-78v0,-58,35,-92,94,-92xm81,-179v0,42,33,45,71,36v0,-42,1,-82,-37,-81v-25,0,-34,17,-34,45"},":":{"d":"28,-197v16,3,45,-7,50,7v-3,17,8,48,-8,52v-16,-3,-45,7,-49,-7v3,-17,-7,-47,7,-52xm28,-59v16,3,45,-7,50,6v-3,17,8,49,-8,53v-16,-3,-45,7,-49,-7v3,-17,-8,-48,7,-52","w":98},";":{"d":"28,-197v17,2,45,-7,50,7v-3,17,8,48,-8,52v-16,-3,-44,7,-49,-7v3,-17,-7,-47,7,-52xm28,-59v15,3,49,-7,49,7r-34,81v-5,14,-24,4,-39,7v-3,-1,-7,-3,-6,-7r23,-81v1,-5,3,-7,7,-7","w":98},"<":{"d":"189,-232v4,0,6,6,2,9r-93,82r93,83v4,2,1,9,-2,9v-20,-2,-47,7,-59,-4r-84,-75v-10,-7,-9,-19,0,-26v32,-25,57,-57,93,-78r50,0"},"=":{"d":"199,-203v-3,13,7,38,-7,38r-151,0v-15,-1,-5,-25,-8,-38v0,-4,3,-6,8,-6r151,0v5,0,7,2,7,6xm33,-78v2,-14,-6,-39,8,-39r151,0v14,2,4,26,7,39v0,4,-2,5,-7,5r-151,0v-5,0,-8,-1,-8,-5"},">":{"d":"185,-154v10,9,11,17,0,26v-31,26,-57,57,-92,79r-50,0v-5,0,-5,-7,-2,-9r93,-83v-31,-29,-66,-54,-95,-86v0,-3,1,-5,4,-5v20,2,47,-7,59,4"},"?":{"d":"14,-264v52,-20,148,-20,141,55v-5,54,-60,67,-64,120v-4,13,-30,5,-45,7v-28,-50,40,-78,43,-127v-4,-24,-47,-10,-71,-9v-11,-4,-6,-34,-4,-46xm45,-59v17,2,46,-7,49,7v-3,17,7,47,-7,52v-16,-3,-45,7,-50,-7v3,-18,-7,-48,8,-52","w":172},"@":{"d":"31,-172v41,-96,243,-86,236,42v-4,82,-50,113,-134,113v-39,0,-62,-19,-62,-58v0,-58,13,-106,74,-102v17,1,55,-4,57,17r-10,107v34,-6,43,-35,46,-77v7,-99,-150,-106,-181,-31v-12,29,-14,70,-16,107v-4,70,76,77,145,68v5,1,6,23,-2,23v-93,13,-179,-10,-171,-103v4,-38,6,-77,18,-106xm122,-137v-10,30,-30,101,29,86r8,-90v-14,-3,-30,-4,-37,4","w":278},"A":{"d":"180,-231r54,225v0,4,-2,6,-6,6v-19,-3,-51,8,-58,-7r-13,-59r-74,0r-13,59v-7,15,-39,4,-57,7v-5,0,-6,-3,-6,-8r54,-223v4,-46,77,-50,106,-25v6,6,10,14,13,25xm147,-115v-9,-34,-13,-75,-26,-105v-2,0,-5,2,-6,6r-21,99r53,0","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"L":7,"G":7,"E":5,"C":7}},"B":{"d":"192,-136v20,10,33,29,32,59v0,63,-49,80,-113,80v-33,0,-86,9,-86,-27r0,-219v-2,-38,52,-26,84,-28v66,-3,116,16,114,82v-1,25,-13,44,-31,53xm163,-186v0,-39,-39,-34,-77,-34r0,62v34,0,77,5,77,-28xm86,-47v39,0,79,4,79,-36v0,-36,-42,-33,-79,-32r0,68","w":240,"k":{"\u00dd":14,"\u00c6":7,"Y":14,"X":8,"V":8,"T":5,"A":4}},"C":{"d":"81,-157v-3,64,1,123,74,105v11,1,31,-7,32,6v-3,15,7,39,-8,43v-84,21,-160,-15,-160,-108v0,-96,19,-162,107,-160v23,1,54,-2,61,14v-3,14,8,42,-8,42v-22,0,-32,-2,-53,-2v-34,0,-43,24,-45,60","w":201,"k":{"\u00fd":3,"\u00d2":8,"\u00d4":8,"\u00d3":8,"\u00ff":3,"\u00d5":8,"\u00d8":8,"\u00d6":8,"\u00c7":10,"y":3,"Q":8,"O":8,"G":6}},"D":{"d":"36,-265v100,-20,198,3,191,108v17,132,-60,180,-191,155v-7,-1,-11,-6,-11,-13r0,-238v0,-7,4,-11,11,-12xm87,-50v49,7,79,-10,79,-61v0,-56,3,-112,-54,-107r-25,0r0,168","w":245,"k":{"\u00c1":6,"\u00c2":6,"\u00c3":6,"\u00c0":6,"\u00c6":6,"\u00c5":6,"\u00c4":6,"Z":3,"Y":17,"X":12,"W":2,"V":6,"T":5,"A":6}},"E":{"d":"181,-50v15,1,5,27,8,41v-11,17,-44,11,-77,12v-56,2,-88,-21,-88,-77r0,-120v-6,-84,83,-83,157,-72v15,2,5,27,8,41v0,5,-3,7,-8,7v-35,6,-98,-18,-96,24r0,33r94,0v14,2,5,28,7,41v1,5,-3,8,-7,8r-94,0v2,27,-10,62,23,62r73,0","w":208},"F":{"d":"24,-193v-6,-84,82,-83,157,-73v15,3,5,26,8,41v0,5,-3,7,-8,7v-35,6,-99,-18,-96,25r0,32r94,0v14,2,5,28,7,41v1,5,-3,8,-7,8r-94,0r0,105v-5,15,-37,4,-54,7v-3,0,-8,-3,-7,-7r0,-186","w":209,"k":{"\u00c1":21,"\u00c2":21,"\u00c3":21,"\u00c0":21,"\u00e6":13,"\u00c6":21,"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"\u00e5":13,"\u00e3":13,"\u00e4":13,"\u00e2":13,"\u00e0":13,"\u00e1":13,"\u00c5":21,"\u00c4":21,"u":9,"o":13,"e":11,"a":13,"O":4,"G":8,"A":21,".":38,",":38}},"G":{"d":"18,-111v0,-132,63,-185,185,-151v13,4,3,29,6,43v1,5,-3,5,-7,5v-9,-1,-63,-3,-75,-3v-52,0,-47,54,-47,106v0,48,22,67,68,60r0,-83v5,-15,36,-4,53,-7v3,-1,8,4,7,7r0,121v0,7,-2,8,-7,9v-24,5,-51,7,-80,7v-65,-1,-103,-43,-103,-114","k":{"Y":9,"V":2}},"H":{"d":"183,-268v17,3,48,-8,54,7r0,254v-4,15,-37,4,-54,7v-3,0,-8,-3,-7,-7r0,-104r-89,0r0,104v-5,15,-38,4,-55,7v-3,0,-8,-3,-7,-7r0,-254v5,-15,38,-3,55,-7v4,0,7,3,7,7r0,96r89,0r0,-96v0,-4,3,-7,7,-7","w":262},"I":{"d":"32,-268v18,3,49,-8,55,7r0,254v-5,15,-38,3,-55,7v-4,0,-7,-3,-7,-7r0,-254v0,-4,3,-7,7,-7","w":111},"J":{"d":"32,-268v18,3,49,-8,55,7r0,263v2,54,-37,68,-88,61v-11,-5,-2,-30,-5,-43v2,-14,31,6,31,-18r0,-263v0,-4,3,-7,7,-7","w":111},"K":{"d":"32,-268v18,3,49,-8,55,7r0,115r79,-117v12,-11,42,-5,63,-5v7,0,7,5,4,10r-86,121r88,133v-13,10,-47,1,-67,4v-3,0,-6,-2,-8,-5r-73,-119r0,117v-5,15,-38,4,-55,7v-3,0,-8,-3,-7,-7r0,-254v0,-4,3,-7,7,-7","w":244,"k":{"\u00fd":19,"\u00dd":4,"\u00d9":2,"\u00db":2,"\u00da":2,"\u00d2":19,"\u00d4":19,"\u00d3":19,"\u00c8":15,"\u00cb":15,"\u00ca":15,"\u00ff":19,"\u00d5":19,"\u00e6":10,"\u00d8":19,"\u00fc":17,"\u00fb":17,"\u00f9":17,"\u00fa":17,"\u00f5":14,"\u00f6":14,"\u00f4":14,"\u00f2":14,"\u00f3":14,"\u00eb":18,"\u00ea":18,"\u00e8":18,"\u00e9":18,"\u00e5":10,"\u00e3":10,"\u00e4":10,"\u00e2":10,"\u00e0":10,"\u00e1":10,"\u00dc":2,"\u00d6":19,"\u00c9":15,"\u00c7":8,"y":19,"w":18,"v":19,"u":17,"q":9,"o":14,"g":6,"e":18,"d":12,"c":12,"a":10,"Y":4,"W":4,"V":2,"U":2,"T":2,"Q":19,"O":19,"L":5,"G":22,"E":15,"C":22,"-":6}},"L":{"d":"87,-74v-3,49,78,7,92,31v-2,15,7,39,-7,42v-66,12,-147,7,-147,-73r0,-186v4,-16,37,-5,55,-8v3,0,8,5,7,8r0,186","w":186,"k":{"\u00fd":23,"\u00dd":35,"\u00d9":12,"\u00db":12,"\u00da":12,"\u00d2":11,"\u00d4":11,"\u00d3":11,"\u00c8":6,"\u00cb":6,"\u00ca":6,"\u00ff":23,"\u00d5":11,"\u00d8":11,"\u00ae":9,"\u00eb":3,"\u00ea":3,"\u00e8":3,"\u00e9":3,"\u00dc":12,"\u00d6":11,"\u00c9":6,"y":23,"w":8,"v":8,"o":4,"e":3,"Y":35,"W":11,"V":23,"U":12,"T":30,"S":2,"Q":11,"O":11,"L":8,"G":10,"E":6,"C":5,"-":6}},"M":{"d":"222,-268v19,1,46,-6,47,13r0,250v-8,11,-37,2,-54,5v-4,0,-6,-3,-6,-7r-2,-153v-15,17,-23,42,-35,62v-7,10,-40,10,-50,0v-13,-20,-21,-44,-36,-62v-3,48,0,103,-1,153v-5,15,-37,4,-54,7v-4,0,-6,-2,-6,-5r0,-250v1,-19,29,-12,47,-13v7,0,12,3,16,10r59,108v22,-33,39,-73,59,-108v4,-7,9,-10,16,-10","w":293,"k":{"\u00dd":10,"Y":10,"V":6}},"N":{"d":"188,-268v16,3,44,-7,49,7r0,247v0,22,-40,14,-60,12v-36,-46,-59,-106,-93,-154v-7,44,0,101,-2,149v-4,15,-34,4,-50,7v-3,0,-8,-3,-7,-7r0,-247v1,-21,59,-21,65,-2r89,151v4,-49,0,-105,1,-156v0,-5,3,-7,8,-7","w":262,"k":{"V":8,"T":9}},"O":{"d":"126,-271v87,0,106,64,106,159v0,73,-39,115,-106,115v-83,1,-107,-62,-107,-158v0,-74,39,-116,107,-116xm126,-51v51,0,44,-54,44,-104v0,-38,-9,-61,-44,-62v-50,-1,-46,54,-45,105v1,36,9,61,45,61","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c6":5,"\u00c5":7,"\u00c4":7,"x":5,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"P":{"d":"29,-261v78,-22,194,-17,194,80v0,73,-61,93,-137,86r0,88v-5,15,-37,4,-54,7v-4,0,-7,-3,-7,-7r0,-242v0,-6,1,-10,4,-12xm86,-145v34,3,82,2,75,-39v3,-39,-41,-38,-75,-34r0,73","w":234,"k":{"\u00c1":20,"\u00c2":20,"\u00c3":20,"\u00c0":20,"\u00e6":8,"\u00c6":15,"\u00f5":2,"\u00f6":2,"\u00f4":2,"\u00f2":2,"\u00f3":2,"\u00eb":2,"\u00ea":2,"\u00e8":2,"\u00e9":2,"\u00e5":8,"\u00e3":8,"\u00e4":8,"\u00e2":8,"\u00e0":8,"\u00e1":8,"\u00c5":20,"\u00c4":20,"o":2,"e":2,"a":8,"Z":9,"Y":6,"X":13,"T":4,"A":20,".":40,",":38}},"Q":{"d":"126,-271v87,0,111,64,106,159v-3,62,-26,102,-77,112v-6,25,22,17,41,17v17,0,6,23,9,35v-4,14,-32,13,-48,13v-40,0,-63,-21,-60,-65v-64,-12,-78,-72,-78,-155v0,-74,39,-116,107,-116xm126,-51v51,0,44,-54,44,-104v0,-38,-9,-61,-44,-62v-50,-1,-46,54,-45,105v1,36,9,61,45,61","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c6":5,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"R":{"d":"223,-187v0,41,-18,66,-47,77r56,106v-12,9,-48,4,-65,2r-51,-96r-30,-1r0,92v-4,15,-37,4,-54,7v-3,0,-8,-3,-7,-7r0,-242v0,-13,5,-15,16,-17v77,-12,182,-10,182,79xm86,-148v0,0,76,5,76,-39v0,-35,-43,-32,-76,-30r0,69","w":244,"k":{"\u00fd":7,"\u00dd":14,"\u00d2":8,"\u00d4":8,"\u00d3":8,"\u00c8":8,"\u00cb":8,"\u00ca":8,"\u00ff":7,"\u00d5":8,"\u00d8":8,"\u00f5":11,"\u00f6":11,"\u00f4":11,"\u00f2":11,"\u00f3":11,"\u00eb":8,"\u00ea":8,"\u00e8":8,"\u00e9":8,"\u00d6":8,"\u00c9":8,"\u00c7":9,"y":7,"o":11,"g":2,"e":8,"c":2,"Y":14,"V":11,"T":12,"S":3,"Q":8,"O":8,"L":8,"G":10,"E":8,"C":9}},"S":{"d":"183,-214v-42,2,-118,-23,-101,28v39,32,115,39,115,110v0,78,-95,90,-167,71v-14,-4,-4,-27,-7,-42v0,-5,3,-7,8,-7v34,2,121,19,95,-34v-36,-35,-109,-42,-111,-113v-2,-78,98,-77,169,-62v11,6,2,29,5,43v0,4,-2,6,-6,6","w":211,"k":{"y":3,"x":2,"w":8,"v":3,"t":8,"Y":6,"W":4,"V":4,"A":3}},"T":{"d":"195,-268v14,2,4,29,7,44v1,4,-4,7,-7,7r-59,0r0,210v-5,15,-37,4,-54,7v-4,0,-7,-3,-7,-7r0,-210r-59,0v-14,-3,-4,-30,-7,-44v0,-4,3,-7,7,-7r179,0","w":211,"k":{"\u00fd":10,"\u00d2":11,"\u00d4":11,"\u00d3":11,"\u00c8":8,"\u00cb":8,"\u00c1":25,"\u00ca":8,"\u00c2":25,"\u00ff":10,"\u00d5":11,"\u00c3":25,"\u00c0":25,"\u00e6":22,"\u00d8":11,"\u00c6":25,"\u00fc":7,"\u00fb":7,"\u00f9":7,"\u00fa":7,"\u00f5":28,"\u00f6":28,"\u00f4":28,"\u00f2":28,"\u00f3":28,"\u00ee":-8,"\u00eb":24,"\u00ea":24,"\u00e8":24,"\u00e9":24,"\u00e5":22,"\u00e3":22,"\u00e4":22,"\u00e2":22,"\u00e0":22,"\u00e1":22,"\u00d6":11,"\u00c9":8,"\u00c5":25,"\u00c4":25,"z":5,"y":10,"x":6,"w":5,"v":5,"u":7,"s":21,"r":12,"q":23,"p":6,"o":28,"n":6,"m":6,"g":10,"e":24,"d":18,"c":15,"a":22,"Q":11,"O":11,"G":9,"F":6,"E":8,"C":10,"A":25,"\/":29,".":20,"-":21,",":20}},"U":{"d":"178,-268v18,3,49,-7,54,7r0,161v1,71,-35,103,-104,103v-69,0,-104,-33,-104,-103r0,-161v5,-15,37,-4,54,-7v5,0,8,2,8,7r0,161v-2,35,10,52,42,52v33,0,42,-18,42,-52r0,-161v0,-5,3,-7,8,-7","w":255,"k":{"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c6":7,"\u00c5":7,"\u00c4":7,"X":6,"A":7}},"V":{"d":"180,-268v18,4,52,-9,57,8r-54,223v-6,56,-106,52,-119,0r-54,-225v7,-13,39,-3,56,-6v4,0,7,3,7,7r45,208v0,6,8,7,10,0r45,-208v1,-4,3,-6,7,-7","w":246,"k":{"\u00fd":5,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00c8":12,"\u00cb":12,"\u00c1":20,"\u00ca":12,"\u00c2":20,"\u00ff":5,"\u00d5":9,"\u00c3":20,"\u00c0":20,"\u00a1":4,"\u00bf":36,"\u00e6":18,"\u00d8":9,"\u00c6":20,"\u00fc":12,"\u00fb":12,"\u00f9":12,"\u00fa":12,"\u00f5":18,"\u00f6":18,"\u00f4":18,"\u00f2":18,"\u00f3":18,"\u00ef":-7,"\u00ee":-5,"\u00eb":18,"\u00ea":18,"\u00e8":18,"\u00e9":18,"\u00e5":18,"\u00e3":18,"\u00e4":18,"\u00e2":18,"\u00e0":18,"\u00e1":18,"\u00d6":9,"\u00c9":12,"\u00c5":20,"\u00c4":20,"z":4,"y":5,"x":6,"w":4,"v":4,"u":12,"s":16,"r":9,"q":16,"p":4,"o":18,"n":4,"m":4,"g":15,"e":18,"c":15,"a":18,"S":3,"Q":9,"O":9,"G":8,"F":7,"E":12,"C":10,"A":20,"\/":20,".":20,",":20}},"W":{"d":"253,-261v6,-15,38,-4,55,-7v4,0,6,2,6,6r-34,236v1,39,-78,36,-86,3v-8,-37,-17,-78,-32,-111v-16,32,-19,76,-31,111v-4,35,-82,35,-87,-3r-34,-237v8,-12,38,-2,55,-5v4,0,6,3,6,7r20,193v1,6,3,7,5,0r26,-99v4,-24,33,-15,58,-17v12,0,19,5,22,17v10,34,16,72,29,104v11,-62,13,-134,22,-198","w":320,"k":{"\u00d2":4,"\u00d4":4,"\u00d3":4,"\u00c1":10,"\u00c2":10,"\u00d5":4,"\u00c3":10,"\u00c0":10,"\u00bf":26,"\u00e6":7,"\u00d8":4,"\u00c6":10,"\u00f5":5,"\u00f6":5,"\u00f4":5,"\u00f2":5,"\u00f3":5,"\u00eb":5,"\u00ea":5,"\u00e8":5,"\u00e9":5,"\u00e5":7,"\u00e3":7,"\u00e4":7,"\u00e2":7,"\u00e0":7,"\u00e1":7,"\u00d6":4,"\u00c5":10,"\u00c4":10,"z":5,"x":10,"s":5,"q":5,"o":5,"g":5,"e":5,"d":5,"c":5,"a":7,"S":4,"Q":4,"O":4,"E":4,"A":10}},"X":{"d":"14,-261v-3,-3,2,-6,4,-7v23,3,57,-9,67,7r45,73r40,-73v11,-14,47,-6,66,-5v2,2,2,2,1,5r-74,127r79,130v-13,10,-48,2,-68,3v-19,-24,-33,-54,-51,-80r-42,74v-10,16,-41,3,-62,7v-5,0,-5,-3,-5,-7r76,-130","w":253,"k":{"\u00fd":17,"\u00d2":18,"\u00d4":18,"\u00d3":18,"\u00ff":17,"\u00d5":18,"\u00e6":12,"\u00d8":18,"\u00fc":13,"\u00fb":13,"\u00f9":13,"\u00fa":13,"\u00f5":14,"\u00f6":14,"\u00f4":14,"\u00f2":14,"\u00f3":14,"\u00eb":12,"\u00ea":12,"\u00e8":12,"\u00e9":12,"\u00e5":12,"\u00e3":12,"\u00e4":12,"\u00e2":12,"\u00e0":12,"\u00e1":12,"\u00d6":18,"y":17,"v":15,"u":13,"o":14,"e":12,"a":12,"U":6,"Q":18,"O":18,"L":7,"G":17,"E":12,"C":15,"-":15}},"Y":{"d":"220,-268v4,0,5,3,5,8v-22,47,-39,100,-65,143v-4,4,-8,8,-13,10r0,100v-4,15,-37,4,-54,7v-3,0,-8,-3,-7,-7r0,-100v-12,-6,-17,-14,-24,-28r-55,-127v8,-14,40,-3,58,-6v3,0,5,3,7,7r41,105v4,3,7,-1,9,-4r38,-101v9,-15,40,-4,60,-7","k":{"\u00fd":15,"\u00d2":16,"\u00d4":16,"\u00d3":16,"\u00c8":13,"\u00cb":13,"\u00c1":27,"\u00ca":13,"\u00c2":27,"\u00ff":15,"\u00d5":16,"\u00c3":27,"\u00c0":27,"\u00a1":20,"\u00bf":50,"\u00e6":32,"\u00d8":16,"\u00c6":27,"\u00fc":24,"\u00fb":24,"\u00f9":24,"\u00fa":24,"\u00f5":35,"\u00f6":35,"\u00f4":35,"\u00f2":35,"\u00f3":35,"\u00ef":-8,"\u00eb":34,"\u00ea":34,"\u00e8":34,"\u00e9":34,"\u00e5":32,"\u00e3":32,"\u00e4":32,"\u00e2":32,"\u00e0":32,"\u00e1":32,"\u00d6":16,"\u00c9":13,"\u00c7":18,"\u00c5":27,"\u00c4":27,"z":23,"y":15,"x":15,"w":16,"v":17,"u":24,"s":24,"r":25,"q":33,"p":25,"o":35,"n":17,"m":17,"g":33,"e":34,"d":33,"c":33,"a":32,"S":3,"Q":16,"O":16,"G":18,"F":13,"E":13,"C":18,"A":27,"\/":35,".":35,"-":20,",":35}},"Z":{"d":"196,-53v15,2,4,31,7,46v0,4,-3,7,-7,7r-163,0v-25,1,-17,-38,-10,-56r102,-155v-23,-9,-64,1,-93,-3v-15,-2,-5,-31,-8,-47v1,-4,4,-7,8,-7r155,0v22,-1,16,37,11,53r-103,159v26,9,69,0,101,3","w":221,"k":{"\u00fd":5,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":5,"\u00d5":7,"\u00e6":7,"\u00d8":7,"\u00fc":5,"\u00fb":5,"\u00f9":5,"\u00fa":5,"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e5":7,"\u00e3":7,"\u00e4":7,"\u00e2":7,"\u00e0":7,"\u00e1":7,"\u00d6":7,"y":5,"v":5,"u":5,"o":8,"g":10,"e":7,"c":10,"a":7,"Q":7,"O":7,"G":9,"C":4}},"[":{"d":"82,24v15,2,40,-6,42,7v-2,14,6,39,-7,39r-88,0v-4,0,-7,-2,-6,-7r0,-324v0,-5,3,-6,6,-7r87,0v12,3,5,26,7,39v-2,14,-28,5,-41,7r0,246","w":134,"k":{"A":13}},"\\":{"d":"65,-260r76,256v-7,13,-35,3,-52,6v-3,0,-6,-3,-7,-8r-77,-256v7,-13,35,-3,52,-6v4,0,6,3,8,8","w":145},"]":{"d":"106,-268v4,0,6,3,6,7r0,324v0,4,-2,7,-6,7r-88,0v-12,-1,-11,-43,0,-46r35,0r0,-246v-14,-2,-40,6,-42,-7v2,-14,-5,-39,7,-39r88,0","w":134},"^":{"d":"205,-211v3,4,3,7,-2,8v-19,-2,-48,6,-58,-6r-29,-32v-14,12,-21,32,-40,38v-16,-2,-42,5,-51,-4v14,-22,30,-43,47,-62v26,-2,75,-8,94,5"},"_":{"d":"199,14v13,1,9,29,0,29r-203,0v-11,1,-6,-14,-7,-23v0,-4,2,-6,7,-6r203,0","w":194},"`":{"d":"104,-233v1,2,2,7,-2,6v-16,-2,-38,5,-47,-4v-15,-15,-32,-29,-45,-47v15,-3,49,-6,61,3","w":159},"a":{"d":"34,-202v67,-18,147,-10,147,66r0,129v-4,14,-33,4,-48,7v-6,0,-8,-6,-7,-13v-39,31,-117,17,-112,-49v4,-53,47,-63,108,-61v12,-52,-52,-35,-88,-35v-11,0,-13,-40,0,-44xm71,-62v0,30,33,23,52,13r0,-39v-28,0,-52,-2,-52,26","w":202,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"b":{"d":"80,-207v85,-13,120,29,120,118v0,93,-98,109,-176,79v-7,-80,0,-175,-2,-259v4,-14,35,-4,51,-7v3,-1,8,4,7,7r0,62xm80,-47v35,7,67,-2,62,-42v5,-49,-7,-84,-62,-70r0,112","w":214,"k":{"\u00fd":7,"\u00ff":7,"y":7,"x":8,"v":7,"t":5,"f":5}},"c":{"d":"104,-46v20,0,45,-10,52,3r0,33v-7,16,-37,13,-56,13v-64,0,-88,-49,-84,-121v3,-56,29,-91,84,-91v21,0,50,-3,56,14v-2,13,6,37,-8,38v-40,-5,-73,-11,-73,39v0,34,-3,72,29,72","w":170,"k":{"\u00f5":12,"\u00f6":12,"\u00f4":12,"\u00f2":12,"\u00f3":12,"\u00eb":8,"\u00ea":8,"\u00e8":8,"\u00e9":8,"\u00e7":6,"o":12,"e":8}},"d":{"d":"142,-276v17,3,47,-7,51,7r-2,259v-21,10,-55,13,-86,13v-68,0,-90,-45,-90,-120v0,-69,47,-102,120,-90r0,-62v0,-3,3,-8,7,-7xm73,-117v0,35,-3,73,32,72v11,0,21,-1,30,-2r0,-112v-37,-8,-62,2,-62,42","w":214},"e":{"d":"107,-209v65,1,93,45,89,115v0,6,-2,9,-7,9r-115,1v-3,55,62,35,107,36v13,1,10,39,-1,43v-89,24,-175,0,-164,-109v6,-58,32,-95,91,-95xm107,-162v-22,0,-34,17,-33,41v21,-1,46,2,65,-1v1,-24,-10,-40,-32,-40","w":212,"k":{"\u00fd":7,"\u00ff":7,"y":7,"x":8,"v":7,"t":5,"f":5,"T":22}},"f":{"d":"107,-279v9,1,35,-2,35,10v0,12,7,34,-8,34v-15,0,-34,-5,-29,17r0,12v13,1,35,-5,37,7v-2,13,5,36,-8,36r-29,0r0,156v-5,15,-36,4,-52,7v-3,0,-8,-3,-7,-7r0,-156v-12,-4,-33,1,-36,-12v1,-12,-4,-31,7,-31r29,0v-3,-52,11,-75,61,-73","w":152,"k":{"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"s":2,"q":7,"o":8,"g":5,"e":7,"c":3,".":21,",":21}},"g":{"d":"199,-206v18,6,11,44,-9,41v34,66,-41,118,-118,92v-8,6,-5,17,5,18v46,19,126,5,125,70v-1,47,-40,58,-94,58v-51,1,-91,-12,-91,-61v0,-16,7,-29,21,-40v-21,-11,-26,-50,-2,-64v-10,-9,-17,-26,-17,-46v0,-80,99,-68,180,-68xm109,-110v22,-1,33,-7,32,-28v0,-18,-11,-26,-32,-26v-22,0,-33,9,-33,29v0,17,11,25,33,25xm108,33v31,4,48,-22,22,-33v-11,-5,-36,-9,-51,-13v-6,8,-7,16,-7,28v1,17,17,16,36,18","w":215},"h":{"d":"135,-209v91,-3,57,119,64,201v-3,15,-34,5,-51,8v-5,1,-8,-4,-8,-8r0,-119v4,-43,-32,-39,-60,-22r0,141v-2,16,-34,5,-51,8v-4,1,-8,-5,-7,-8r0,-261v4,-14,35,-4,51,-7v3,-1,8,4,7,7r0,76v17,-11,30,-15,55,-16","w":220,"k":{"\u00fd":7,"\u00ff":7,"y":7,"w":7,"v":7,"t":5,"f":5}},"i":{"d":"29,-278v17,3,50,-8,54,8v-2,13,6,37,-7,40v-17,-3,-48,8,-54,-7v2,-14,-6,-38,7,-41xm30,-206v17,3,47,-7,51,7r0,192v-4,14,-35,4,-51,7v-3,0,-8,-3,-7,-7r0,-192v-1,-3,4,-8,7,-7","w":104},"j":{"d":"29,-278v18,3,49,-8,54,8v-2,14,6,38,-8,40v-17,-3,-48,8,-53,-7v2,-14,-6,-38,7,-41xm30,-206v17,3,47,-7,51,7r0,211v1,44,-17,61,-57,61v-12,0,-33,1,-36,-10v0,-20,-6,-41,24,-35v12,-1,11,-4,11,-16r0,-211v0,-3,3,-8,7,-7","w":104},"k":{"d":"29,-276v17,3,47,-7,51,7r0,151r55,-83v11,-11,41,-2,60,-5v5,0,8,3,5,7r-67,91r67,103v0,3,-2,5,-5,5v-21,-2,-51,6,-63,-5r-52,-85r0,82v-2,16,-34,5,-51,8v-4,1,-8,-5,-7,-8r0,-261v-1,-4,4,-7,7,-7","w":211,"k":{"\u00e6":7,"\u00fc":9,"\u00fb":9,"\u00f9":9,"\u00fa":9,"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"\u00eb":14,"\u00ea":14,"\u00e8":14,"\u00e9":14,"\u00e5":7,"\u00e3":7,"\u00e4":7,"\u00e2":7,"\u00e0":7,"\u00e1":7,"u":9,"q":13,"o":13,"g":13,"e":14,"d":14,"c":13,"a":7}},"l":{"d":"29,-276v17,3,46,-7,51,7r0,261v-2,16,-34,5,-51,8v-4,1,-8,-5,-7,-8r0,-261v-1,-4,4,-7,7,-7","w":101},"m":{"d":"232,-209v89,-3,61,120,61,201v0,16,-34,5,-51,8v-5,1,-7,-5,-7,-8r0,-122v4,-36,-27,-34,-50,-24v5,44,1,98,2,146v-3,15,-34,5,-51,8v-4,1,-9,-4,-8,-8r0,-122v3,-37,-23,-34,-48,-21r0,143v-2,16,-34,5,-51,8v-4,1,-8,-5,-7,-8r0,-191v3,-14,32,-7,48,-7v7,0,7,7,7,15v29,-22,74,-26,96,-1v21,-10,31,-17,59,-17","w":315,"k":{"y":5,"v":7,"t":5,"f":7}},"n":{"d":"135,-209v91,-3,57,119,64,201v-3,15,-34,5,-51,8v-5,1,-8,-4,-8,-8r0,-119v4,-43,-32,-39,-60,-22r0,141v-2,16,-34,5,-51,8v-4,1,-8,-5,-7,-8r0,-191v3,-14,31,-5,47,-7v8,-1,7,8,7,16v18,-12,31,-19,59,-19","w":220,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":6,"v":9,"t":5,"f":7}},"o":{"d":"106,-209v66,-1,90,46,90,119v0,57,-33,94,-90,93v-67,0,-90,-45,-90,-118v0,-59,31,-94,90,-94xm106,-46v32,1,33,-35,32,-69v0,-27,-7,-43,-32,-44v-32,0,-32,33,-32,69v0,26,9,44,32,44","w":211,"k":{"\u00fd":8,"\u00ff":8,"z":6,"y":8,"x":14,"w":5,"v":7,"t":7,"f":7}},"p":{"d":"24,-196v75,-29,186,-15,176,79v8,86,-33,132,-120,118r0,62v-4,14,-35,4,-51,7v-3,0,-8,-3,-7,-7xm80,-47v52,12,62,-16,62,-70v0,-39,-23,-50,-62,-42r0,112","w":214,"k":{"\u00fd":7,"\u00ff":7,"y":7,"x":10,"w":2,"v":7,"t":5,"f":7}},"q":{"d":"15,-89v0,-113,81,-142,176,-107v7,80,0,175,2,259v-4,14,-35,4,-51,7v-4,0,-7,-3,-7,-7r0,-62v-74,11,-120,-20,-120,-90xm73,-117v0,35,-3,73,32,72v8,0,19,-1,30,-2r0,-112v-8,-1,-18,-2,-30,-2v-25,0,-31,19,-32,44","w":214},"r":{"d":"127,-209v15,1,5,27,8,41v0,5,-3,8,-9,7v-16,0,-31,5,-46,13r0,140v-2,16,-34,5,-51,8v-4,1,-8,-5,-7,-8r0,-191v4,-14,34,-4,50,-7v6,0,8,6,7,14v10,-9,30,-17,48,-17","w":142,"k":{"\u00e6":8,"\u00f5":7,"\u00f6":7,"\u00f4":7,"\u00f2":7,"\u00f3":7,"\u00eb":6,"\u00ea":6,"\u00e8":6,"\u00e9":6,"\u00e5":8,"\u00e3":8,"\u00e4":8,"\u00e2":8,"\u00e0":8,"\u00e1":8,"q":4,"o":7,"g":6,"e":6,"d":7,"c":5,"a":8,".":11,",":11}},"s":{"d":"93,-161v-22,0,-23,14,-8,23v33,19,80,32,81,81v2,63,-85,69,-143,52v-12,-4,-3,-24,-6,-37v-1,-5,3,-7,8,-7v18,3,44,5,61,5v25,0,27,-23,8,-29v-31,-21,-77,-31,-79,-80v-3,-65,83,-61,138,-48v13,3,5,25,7,38v0,5,-2,6,-7,6v-14,-2,-44,-4,-60,-4","w":181,"k":{"v":2,"t":2}},"t":{"d":"103,-58v-4,20,13,17,30,17v14,1,4,22,7,34v0,12,-29,8,-35,10v-84,10,-55,-93,-60,-166v-13,-4,-34,1,-37,-12v1,-12,-4,-31,8,-31r29,0v2,-13,-6,-34,7,-37r45,-7v13,2,3,31,6,44v13,2,36,-5,37,7v-2,13,5,36,-7,36r-30,0r0,105","w":151,"k":{"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"q":2,"o":4}},"u":{"d":"148,-206v17,2,46,-6,51,7r0,192v-4,14,-33,5,-48,7v-7,1,-8,-8,-7,-16v-17,13,-32,19,-59,19v-91,2,-56,-120,-63,-202v3,-14,34,-4,51,-7v4,-1,7,4,7,7r0,120v-7,44,38,37,60,22r0,-142v0,-4,3,-8,8,-7","w":220},"v":{"d":"197,-206v5,0,6,3,6,8v-20,61,-31,133,-58,187v-27,26,-89,15,-92,-24r-45,-165v0,-4,2,-6,6,-6v18,3,48,-8,55,7r31,141v1,11,10,10,11,0r31,-141v6,-16,37,-3,55,-7","w":210,"k":{"\u00e6":8,"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e5":8,"\u00e3":8,"\u00e4":8,"\u00e2":8,"\u00e0":8,"\u00e1":8,"q":8,"o":8,"g":10,"e":7,"d":7,"a":8,".":20,",":20}},"w":{"d":"288,-206v5,0,6,3,6,7r-32,174v-1,35,-77,35,-84,2v-7,-32,-14,-67,-26,-96v-12,28,-19,64,-26,96v-7,33,-78,33,-84,-2r-32,-175v5,-13,34,-3,49,-6v5,0,7,2,8,6r23,141v16,-32,16,-82,34,-112v16,-6,62,-11,63,13v10,32,14,70,27,99v11,-43,14,-95,23,-141v6,-13,35,-3,51,-6","w":304,"k":{"\u00e6":4,"\u00f5":5,"\u00f6":5,"\u00f4":5,"\u00f2":5,"\u00f3":5,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"o":5,"e":7,"c":4,"a":4,".":14,",":10}},"x":{"d":"143,-199v11,-14,52,-8,62,-3v-18,34,-40,65,-60,98r66,99v-9,11,-48,5,-65,3r-40,-61r-33,56v-10,15,-38,4,-58,7v-4,1,-5,-4,-3,-7r63,-100r-62,-94v10,-11,45,-3,64,-4r36,56","w":222,"k":{"\u00fc":8,"\u00fb":8,"\u00f9":8,"\u00fa":8,"\u00f5":15,"\u00f6":15,"\u00f4":15,"\u00f2":15,"\u00f3":15,"\u00eb":15,"\u00ea":15,"\u00e8":15,"\u00e9":15,"w":8,"u":11,"t":9,"q":17,"o":15,"g":15,"e":15,"d":17,"c":11}},"y":{"d":"198,-206v5,-1,7,3,7,8r-61,212v-10,40,-29,59,-78,59v-17,0,-47,0,-52,-13v2,-13,-6,-36,8,-36v32,0,71,12,72,-26v-26,0,-31,-9,-39,-34r-47,-165v0,-4,2,-5,7,-5r48,0v4,0,5,1,6,6v13,47,20,100,37,143r4,0r33,-143v8,-14,38,-3,55,-6","w":213,"k":{"\u00e6":9,"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e7":10,"\u00e5":9,"\u00e3":9,"\u00e4":9,"\u00e2":9,"\u00e0":9,"\u00e1":9,"q":7,"o":8,"g":9,"e":7,"d":5,"c":10,"a":9,".":22,",":20}},"z":{"d":"163,-49v14,1,4,28,7,42v1,4,-4,7,-7,7r-135,0v-18,-1,-17,-37,-7,-49r79,-109v-22,-3,-51,1,-75,-1v-12,-1,-3,-27,-6,-40v-1,-3,4,-8,7,-7r131,0v18,-1,14,36,8,51r-75,105v21,3,50,-1,73,1","w":185,"k":{"\u00f5":6,"\u00f6":6,"\u00f4":6,"\u00f2":6,"\u00f3":6,"\u00eb":8,"\u00ea":8,"\u00e8":8,"\u00e9":8,"o":6,"e":8,"d":2}},"{":{"d":"94,3v-4,37,38,10,42,28v-2,14,6,38,-8,39v-60,3,-93,-8,-93,-67v0,-37,6,-70,-21,-84r0,-34v26,-12,21,-49,21,-86v0,-59,33,-72,93,-67v13,1,5,26,7,39v-4,19,-50,-8,-41,28v1,46,3,91,-30,103v32,13,35,56,30,101","w":146},"|":{"d":"30,-268v18,3,47,-7,52,8r0,322v-4,16,-35,5,-52,8v-4,1,-8,-5,-7,-8r0,-322v-1,-4,4,-7,7,-8","w":104},"}":{"d":"112,-201v0,36,-5,74,20,86r0,34v-27,14,-20,48,-20,84v0,60,-34,70,-94,67v-12,-1,-11,-43,0,-46v21,1,37,4,35,-21v-3,-45,-4,-90,30,-101v-34,-13,-33,-57,-30,-103v1,-25,-14,-20,-35,-21v-11,-1,-12,-41,0,-46v60,-3,94,8,94,67","w":146},"~":{"d":"135,-166v14,9,31,7,26,-16v2,-14,26,-4,39,-7v9,-1,7,8,7,16v7,52,-47,67,-84,44v-12,-7,-24,-18,-41,-20v-17,-2,-5,25,-17,28v-15,-3,-44,10,-40,-14v-6,-50,41,-68,78,-50"},"\u00c4":{"d":"180,-231r54,225v0,4,-2,6,-6,6v-19,-3,-51,8,-58,-7r-13,-59r-74,0r-13,59v-7,15,-39,4,-57,7v-5,0,-6,-3,-6,-8r54,-223v4,-46,77,-50,106,-25v6,6,10,14,13,25xm147,-115v-9,-34,-13,-75,-26,-105v-2,0,-5,2,-6,6r-21,99r53,0xm134,-329v5,-14,48,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33xm56,-329v6,-13,47,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"G":7,"C":7}},"\u00c5":{"d":"120,-364v24,0,42,18,42,42v1,23,-19,43,-42,42v-22,0,-42,-19,-42,-42v0,-23,20,-42,42,-42xm120,-306v8,0,16,-7,16,-16v0,-9,-8,-16,-16,-16v-8,0,-15,8,-15,16v0,8,7,16,15,16xm180,-231r54,225v0,4,-2,6,-6,6v-19,-3,-51,8,-58,-7r-13,-59r-74,0r-13,59v-7,15,-39,4,-57,7v-5,0,-6,-3,-6,-8r54,-223v4,-46,77,-50,106,-25v6,6,10,14,13,25xm147,-115v-9,-34,-13,-75,-26,-105v-2,0,-5,2,-6,6r-21,99r53,0","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"G":7,"C":7}},"\u00c7":{"d":"81,-157v-3,64,1,123,74,105v11,1,31,-7,32,6v-3,15,7,39,-8,43v-84,21,-160,-15,-160,-108v0,-96,19,-162,107,-160v23,1,54,-2,61,14v-3,14,8,42,-8,42v-22,0,-32,-2,-53,-2v-34,0,-43,24,-45,60xm151,13v5,-1,4,3,2,5v-19,15,-31,37,-53,48v-13,-1,-31,3,-41,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","w":201,"k":{"\u00fd":3,"\u00d2":8,"\u00d4":8,"\u00d3":8,"\u00ff":3,"\u00d5":8,"\u00d8":8,"\u00d6":8,"y":3,"Q":8,"O":8}},"\u00c9":{"d":"181,-50v15,1,5,27,8,41v-11,17,-44,11,-77,12v-56,2,-88,-21,-88,-77r0,-120v-6,-84,83,-83,157,-72v15,2,5,27,8,41v0,5,-3,7,-8,7v-35,6,-98,-18,-96,24r0,33r94,0v14,2,5,28,7,41v1,5,-3,8,-7,8r-94,0v2,27,-10,62,23,62r73,0xm168,-339v5,-1,4,3,2,5v-18,16,-31,36,-52,48v-14,-1,-32,3,-42,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","w":208},"\u00d1":{"d":"126,-334v10,5,35,31,39,7v-5,-18,16,-12,31,-13v7,-1,5,7,5,13v6,50,-60,53,-85,25v-10,-11,-25,-7,-23,10v1,13,-20,6,-31,7v-6,1,-5,-7,-5,-13v-5,-40,38,-52,69,-36xm188,-268v16,3,44,-7,49,7r0,247v0,22,-40,14,-60,12v-36,-46,-59,-106,-93,-154v-7,44,0,101,-2,149v-4,15,-34,4,-50,7v-3,0,-8,-3,-7,-7r0,-247v1,-21,59,-21,65,-2r89,151v4,-49,0,-105,1,-156v0,-5,3,-7,8,-7","w":262},"\u00d6":{"d":"126,-271v87,0,106,64,106,159v0,73,-39,115,-106,115v-83,1,-107,-62,-107,-158v0,-74,39,-116,107,-116xm126,-51v51,0,44,-54,44,-104v0,-38,-9,-61,-44,-62v-50,-1,-46,54,-45,105v1,36,9,61,45,61xm140,-329v5,-14,48,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33xm62,-329v6,-13,47,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"\u00dc":{"d":"178,-268v18,3,49,-7,54,7r0,161v1,71,-35,103,-104,103v-69,0,-104,-33,-104,-103r0,-161v5,-15,37,-4,54,-7v5,0,8,2,8,7r0,161v-2,35,10,52,42,52v33,0,42,-18,42,-52r0,-161v0,-5,3,-7,8,-7xm142,-329v5,-14,48,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33xm64,-329v6,-13,47,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33","w":255,"k":{"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"A":7}},"\u00e1":{"d":"34,-202v67,-18,147,-10,147,66r0,129v-4,14,-33,4,-48,7v-6,0,-8,-6,-7,-13v-39,31,-117,17,-112,-49v4,-53,47,-63,108,-61v12,-52,-52,-35,-88,-35v-11,0,-13,-40,0,-44xm71,-62v0,30,33,23,52,13r0,-39v-28,0,-52,-2,-52,26xm164,-280v5,-1,4,3,2,5v-18,16,-31,36,-52,48v-14,-1,-32,3,-42,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","w":202,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"\u00e0":{"d":"34,-202v67,-18,147,-10,147,66r0,129v-4,14,-33,4,-48,7v-6,0,-8,-6,-7,-13v-39,31,-117,17,-112,-49v4,-53,47,-63,108,-61v12,-52,-52,-35,-88,-35v-11,0,-13,-40,0,-44xm71,-62v0,30,33,23,52,13r0,-39v-28,0,-52,-2,-52,26xm131,-233v1,2,2,7,-2,6v-16,-2,-38,5,-47,-4v-15,-15,-32,-29,-45,-47v15,-3,49,-6,61,3","w":202,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"\u00e2":{"d":"173,-233v2,2,3,7,-2,6v-15,-1,-37,5,-45,-4r-23,-25v-11,9,-17,25,-32,29v-13,-1,-30,2,-40,-2v10,-20,25,-34,38,-50v21,-1,58,-6,73,4xm34,-202v67,-18,147,-10,147,66r0,129v-4,14,-33,4,-48,7v-6,0,-8,-6,-7,-13v-39,31,-117,17,-112,-49v4,-53,47,-63,108,-61v12,-52,-52,-35,-88,-35v-11,0,-13,-40,0,-44xm71,-62v0,30,33,23,52,13r0,-39v-28,0,-52,-2,-52,26","w":202,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"\u00e4":{"d":"34,-202v67,-18,147,-10,147,66r0,129v-4,14,-33,4,-48,7v-6,0,-8,-6,-7,-13v-39,31,-117,17,-112,-49v4,-53,47,-63,108,-61v12,-52,-52,-35,-88,-35v-11,0,-13,-40,0,-44xm71,-62v0,30,33,23,52,13r0,-39v-28,0,-52,-2,-52,26xm117,-271v5,-14,48,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33xm39,-271v6,-13,47,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33","w":202,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"\u00e3":{"d":"101,-276v10,5,35,31,39,7v-5,-18,16,-12,31,-13v7,-1,5,7,5,13v6,50,-59,53,-85,25v-10,-11,-25,-7,-23,10v1,13,-20,6,-31,7v-6,1,-5,-7,-5,-13v-4,-39,38,-52,69,-36xm34,-202v67,-18,147,-10,147,66r0,129v-4,14,-33,4,-48,7v-6,0,-8,-6,-7,-13v-39,31,-117,17,-112,-49v4,-53,47,-63,108,-61v12,-52,-52,-35,-88,-35v-11,0,-13,-40,0,-44xm71,-62v0,30,33,23,52,13r0,-39v-28,0,-52,-2,-52,26","w":202,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"\u00e5":{"d":"102,-309v23,1,41,19,42,42v1,23,-19,42,-42,42v-22,0,-42,-19,-42,-42v0,-23,19,-43,42,-42xm102,-251v9,0,16,-8,16,-16v0,-8,-8,-15,-16,-15v-8,0,-16,7,-16,15v0,8,7,16,16,16xm34,-202v67,-18,147,-10,147,66r0,129v-4,14,-33,4,-48,7v-6,0,-8,-6,-7,-13v-39,31,-117,17,-112,-49v4,-53,47,-63,108,-61v12,-52,-52,-35,-88,-35v-11,0,-13,-40,0,-44xm71,-62v0,30,33,23,52,13r0,-39v-28,0,-52,-2,-52,26","w":202,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"\u00e7":{"d":"104,-46v20,0,45,-10,52,3r0,33v-7,16,-37,13,-56,13v-64,0,-88,-49,-84,-121v3,-56,29,-91,84,-91v21,0,50,-3,56,14v-2,13,6,37,-8,38v-40,-5,-73,-11,-73,39v0,34,-3,72,29,72xm120,13v5,-1,5,2,3,5v-19,15,-29,38,-53,48v-14,-1,-32,3,-42,-2v14,-17,24,-41,45,-51r47,0","w":170,"k":{"\u00f5":12,"\u00f6":12,"\u00f4":12,"\u00f2":12,"\u00f3":12,"\u00eb":8,"\u00ea":8,"\u00e8":8,"\u00e9":8,"o":12,"e":8}},"\u00e9":{"d":"107,-209v65,1,93,45,89,115v0,6,-2,9,-7,9r-115,1v-3,55,62,35,107,36v13,1,10,39,-1,43v-89,24,-175,0,-164,-109v6,-58,32,-95,91,-95xm107,-162v-22,0,-34,17,-33,41v21,-1,46,2,65,-1v1,-24,-10,-40,-32,-40xm165,-280v5,-1,4,3,2,5v-18,16,-31,36,-52,48v-14,-1,-32,3,-42,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","w":212,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":5,"f":5}},"\u00e8":{"d":"107,-209v65,1,93,45,89,115v0,6,-2,9,-7,9r-115,1v-3,55,62,35,107,36v13,1,10,39,-1,43v-89,24,-175,0,-164,-109v6,-58,32,-95,91,-95xm107,-162v-22,0,-34,17,-33,41v21,-1,46,2,65,-1v1,-24,-10,-40,-32,-40xm145,-233v1,2,2,7,-2,6v-16,-2,-38,5,-47,-4v-15,-15,-32,-29,-45,-47v15,-3,49,-6,61,3","w":212,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":5,"f":5}},"\u00ea":{"d":"176,-233v2,2,4,7,-1,6v-15,-2,-38,5,-46,-4r-23,-25v-10,9,-17,24,-31,29v-13,-1,-31,3,-41,-2v11,-18,25,-34,38,-50v21,0,58,-6,73,4xm107,-209v65,1,93,45,89,115v0,6,-2,9,-7,9r-115,1v-3,55,62,35,107,36v13,1,10,39,-1,43v-89,24,-175,0,-164,-109v6,-58,32,-95,91,-95xm107,-162v-22,0,-34,17,-33,41v21,-1,46,2,65,-1v1,-24,-10,-40,-32,-40","w":212,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":5,"f":5}},"\u00eb":{"d":"107,-209v65,1,93,45,89,115v0,6,-2,9,-7,9r-115,1v-3,55,62,35,107,36v13,1,10,39,-1,43v-89,24,-175,0,-164,-109v6,-58,32,-95,91,-95xm107,-162v-22,0,-34,17,-33,41v21,-1,46,2,65,-1v1,-24,-10,-40,-32,-40xm120,-270v5,-14,48,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33xm42,-270v6,-13,47,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33","w":212,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":5,"f":5}},"\u00ed":{"d":"31,-206v17,3,47,-7,50,7r0,191v-1,16,-33,5,-50,8v-4,1,-9,-4,-8,-8r0,-191v-1,-4,5,-8,8,-7xm80,-280v5,-1,4,3,2,5v-18,16,-31,36,-52,48v-14,-1,-32,3,-42,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","w":104},"\u00ec":{"d":"31,-206v17,3,47,-7,50,7r0,191v-1,16,-33,5,-50,8v-4,1,-9,-4,-8,-8r0,-191v-1,-4,5,-8,8,-7xm117,-233v1,2,2,7,-2,6v-16,-2,-38,5,-47,-4v-15,-15,-32,-29,-45,-47v15,-3,49,-6,61,3","w":104},"\u00ee":{"d":"123,-233v1,2,2,7,-2,6v-15,-2,-38,5,-46,-4r-22,-25v-11,9,-17,25,-32,29v-13,-1,-31,3,-41,-2v11,-18,25,-34,38,-50v21,0,58,-6,73,4xm31,-206v17,3,47,-7,50,7r0,191v-1,16,-33,5,-50,8v-4,1,-9,-4,-8,-8r0,-191v-1,-4,5,-8,8,-7","w":104},"\u00ef":{"d":"31,-206v17,3,47,-7,50,7r0,191v-1,16,-33,5,-50,8v-4,1,-9,-4,-8,-8r0,-191v-1,-4,5,-8,8,-7xm67,-270v5,-14,48,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33xm-11,-270v6,-13,47,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33","w":104},"\u00f1":{"d":"107,-276v9,4,34,31,38,7v-5,-18,16,-12,31,-13v7,-1,5,7,5,13v6,50,-59,52,-84,25v-10,-11,-26,-8,-24,10v1,13,-20,6,-30,7v-6,1,-6,-7,-6,-13v-3,-39,39,-53,70,-36xm135,-209v91,-3,57,119,64,201v-3,15,-34,5,-51,8v-5,1,-8,-4,-8,-8r0,-119v4,-43,-32,-39,-60,-22r0,141v-2,16,-34,5,-51,8v-4,1,-8,-5,-7,-8r0,-191v3,-14,31,-5,47,-7v8,-1,7,8,7,16v18,-12,31,-19,59,-19","w":220,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":9,"t":5}},"\u00f3":{"d":"106,-209v66,-1,90,46,90,119v0,57,-33,94,-90,93v-67,0,-90,-45,-90,-118v0,-59,31,-94,90,-94xm106,-46v32,1,33,-35,32,-69v0,-27,-7,-43,-32,-44v-32,0,-32,33,-32,69v0,26,9,44,32,44xm164,-280v5,-1,4,3,2,5v-18,16,-31,36,-52,48v-14,-1,-32,3,-42,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","w":211,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":14,"w":5,"v":7,"t":7}},"\u00f2":{"d":"106,-209v66,-1,90,46,90,119v0,57,-33,94,-90,93v-67,0,-90,-45,-90,-118v0,-59,31,-94,90,-94xm106,-46v32,1,33,-35,32,-69v0,-27,-7,-43,-32,-44v-32,0,-32,33,-32,69v0,26,9,44,32,44xm138,-233v1,2,2,7,-2,6v-16,-2,-38,5,-47,-4v-15,-15,-32,-29,-45,-47v15,-3,49,-6,61,3","w":211,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":14,"w":5,"v":7,"t":7}},"\u00f4":{"d":"176,-233v2,2,3,7,-2,6v-15,-1,-37,5,-45,-4r-23,-25v-11,9,-17,25,-32,29v-13,-1,-30,2,-40,-2v10,-20,25,-34,38,-50v21,0,58,-6,72,4xm106,-209v66,-1,90,46,90,119v0,57,-33,94,-90,93v-67,0,-90,-45,-90,-118v0,-59,31,-94,90,-94xm106,-46v32,1,33,-35,32,-69v0,-27,-7,-43,-32,-44v-32,0,-32,33,-32,69v0,26,9,44,32,44","w":211,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":14,"w":5,"v":7,"t":7}},"\u00f6":{"d":"106,-209v66,-1,90,46,90,119v0,57,-33,94,-90,93v-67,0,-90,-45,-90,-118v0,-59,31,-94,90,-94xm106,-46v32,1,33,-35,32,-69v0,-27,-7,-43,-32,-44v-32,0,-32,33,-32,69v0,26,9,44,32,44xm120,-270v5,-14,48,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33xm42,-270v6,-13,47,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33","w":211,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":14,"w":5,"v":7,"t":7}},"\u00f5":{"d":"103,-276v10,6,38,34,38,0v0,-11,21,-4,31,-6v7,0,6,7,6,13v5,49,-59,53,-85,25v-10,-11,-25,-8,-23,10v1,13,-20,6,-31,7v-6,1,-5,-7,-5,-13v-5,-40,39,-53,69,-36xm106,-209v66,-1,90,46,90,119v0,57,-33,94,-90,93v-67,0,-90,-45,-90,-118v0,-59,31,-94,90,-94xm106,-46v32,1,33,-35,32,-69v0,-27,-7,-43,-32,-44v-32,0,-32,33,-32,69v0,26,9,44,32,44","w":211,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":14,"w":5,"v":7,"t":7}},"\u00fa":{"d":"148,-206v17,2,46,-6,51,7r0,192v-4,14,-33,5,-48,7v-7,1,-8,-8,-7,-16v-17,13,-32,19,-59,19v-91,2,-56,-120,-63,-202v3,-14,34,-4,51,-7v4,-1,7,4,7,7r0,120v-7,44,38,37,60,22r0,-142v0,-4,3,-8,8,-7xm173,-280v5,-1,4,3,2,5v-18,16,-31,36,-52,48v-14,-1,-32,3,-42,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","w":220},"\u00f9":{"d":"148,-206v17,2,46,-6,51,7r0,192v-4,14,-33,5,-48,7v-7,1,-8,-8,-7,-16v-17,13,-32,19,-59,19v-91,2,-56,-120,-63,-202v3,-14,34,-4,51,-7v4,-1,7,4,7,7r0,120v-7,44,38,37,60,22r0,-142v0,-4,3,-8,8,-7xm142,-233v1,2,2,7,-2,6v-16,-2,-38,5,-47,-4v-15,-15,-32,-29,-45,-47v15,-3,49,-6,61,3","w":220},"\u00fb":{"d":"180,-233v1,2,2,7,-2,6v-15,-1,-37,5,-45,-4r-23,-25v-11,9,-17,25,-32,29v-13,-1,-30,2,-40,-2v12,-19,23,-40,43,-51r63,1v13,14,24,31,36,46xm148,-206v17,2,46,-6,51,7r0,192v-4,14,-33,5,-48,7v-7,1,-8,-8,-7,-16v-17,13,-32,19,-59,19v-91,2,-56,-120,-63,-202v3,-14,34,-4,51,-7v4,-1,7,4,7,7r0,120v-7,44,38,37,60,22r0,-142v0,-4,3,-8,8,-7","w":220},"\u00fc":{"d":"148,-206v17,2,46,-6,51,7r0,192v-4,14,-33,5,-48,7v-7,1,-8,-8,-7,-16v-17,13,-32,19,-59,19v-91,2,-56,-120,-63,-202v3,-14,34,-4,51,-7v4,-1,7,4,7,7r0,120v-7,44,38,37,60,22r0,-142v0,-4,3,-8,8,-7xm124,-270v5,-14,48,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33xm46,-270v6,-13,47,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33","w":220},"\u00b0":{"d":"65,-271v33,3,55,22,55,56v0,33,-22,53,-55,55v-29,1,-55,-26,-55,-55v0,-30,25,-58,55,-56xm65,-189v14,0,26,-12,26,-26v0,-17,-11,-27,-26,-27v-15,0,-25,11,-26,27v0,13,13,26,26,26","w":129},"\u00a2":{"d":"134,-46v20,0,45,-10,52,3r0,33v-3,13,-21,9,-36,12v-2,12,5,33,-7,34v-15,-2,-44,6,-44,-7r0,-30v-71,-16,-75,-185,0,-203v2,-13,-6,-35,7,-37v15,2,40,-6,44,7r0,26v13,3,34,-1,36,13v-2,13,7,38,-8,38v-40,0,-73,-11,-73,39v0,34,-3,72,29,72"},"\u00a3":{"d":"49,-160v-19,-103,69,-130,158,-101v3,11,0,27,1,40v0,4,-2,6,-7,6v-43,-2,-91,-19,-92,25r0,30r61,0v14,3,4,28,7,42v-10,14,-47,2,-68,6v-1,24,3,48,-7,64r98,0v14,2,5,27,7,41v0,4,-3,7,-7,7r-159,0v-24,-29,20,-64,8,-112v-9,-1,-25,3,-25,-6v0,-21,-8,-49,25,-42"},"\u00a7":{"d":"149,-149v38,13,63,66,39,111v30,61,-15,122,-88,116v-27,-2,-65,1,-78,-15v2,-15,-7,-41,8,-43v39,3,123,20,98,-34v-39,-34,-116,-39,-114,-113v1,-10,6,-31,11,-38v-28,-55,10,-106,82,-106v22,0,60,4,76,8v15,4,4,29,7,44v1,3,-3,5,-5,5v-34,-2,-60,-3,-78,-3v-43,-2,-32,29,-4,44xm142,-61v22,-50,-46,-57,-74,-81v-23,49,47,54,74,81","w":211},"\u00b6":{"d":"16,-167v-3,-66,29,-101,88,-101r107,0v4,0,6,2,6,7r0,324v0,10,-13,7,-22,7v-4,0,-6,-3,-6,-7r0,-303r-23,0r0,303v1,10,-12,6,-21,7v-4,0,-7,-2,-6,-7r0,-150v-71,5,-120,-16,-123,-80","w":237},"\u00df":{"d":"179,-143v22,10,37,28,36,62v-2,53,-34,84,-87,84v-9,0,-29,1,-29,-9v3,-16,-11,-46,17,-40v30,0,42,-13,41,-43v-1,-25,-21,-33,-50,-31v-13,-2,-5,-24,-7,-36v0,-7,10,-6,18,-6v24,0,35,-12,35,-37v0,-21,-14,-30,-35,-30v-29,0,-38,16,-39,44r0,177v-2,16,-34,5,-51,8v-5,1,-7,-5,-7,-8r0,-177v0,-63,34,-95,97,-94v58,1,96,26,94,87v-1,22,-17,42,-33,49","w":234},"\u00ae":{"d":"108,-275v60,0,100,39,100,101v0,61,-40,100,-100,100v-60,0,-101,-41,-101,-100v0,-61,41,-101,101,-101xm108,-92v48,0,82,-34,82,-82v0,-48,-34,-83,-82,-83v-49,0,-83,35,-83,83v0,48,35,82,83,82xm103,-238v51,-9,67,56,29,73v8,16,19,29,25,46v-1,7,-25,6,-31,1v-9,-14,-15,-30,-26,-42r-9,0v-2,14,5,39,-4,45v-8,-2,-25,4,-25,-4r0,-106v-1,-19,23,-10,41,-13xm90,-182v18,0,36,3,35,-17v-1,-16,-18,-14,-35,-14r0,31","w":215},"\u00a9":{"d":"135,-255v73,0,120,49,120,120v0,72,-48,120,-120,120v-72,0,-120,-48,-120,-120v0,-72,48,-120,120,-120xm135,-34v59,0,101,-43,101,-101v0,-58,-43,-102,-101,-102v-59,0,-102,44,-102,102v0,59,44,101,102,101xm76,-126v0,-73,43,-105,96,-80v-2,9,5,26,-5,27v-30,-4,-54,-5,-54,33v0,44,10,66,55,54v8,2,2,18,4,26v-4,10,-20,8,-35,8v-42,1,-61,-25,-61,-68","w":270},"\u00b4":{"d":"146,-280v5,-1,4,3,2,5v-18,16,-31,36,-52,48v-14,-1,-32,3,-42,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","w":159},"\u00a8":{"d":"94,-270v5,-14,48,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33xm16,-270v6,-13,47,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33","w":159},"\u00c6":{"d":"218,-74v-2,63,114,-24,94,65v-8,17,-41,12,-68,12v-54,0,-84,-16,-87,-69r-74,0r-13,59v-7,15,-39,4,-57,7v-5,0,-6,-3,-6,-8r54,-223v6,-27,27,-37,60,-37r184,0v14,3,4,29,7,43v1,3,-4,8,-7,7r-87,0r0,57r84,0v14,2,5,28,7,41v0,5,-2,8,-7,8r-84,0r0,38xm157,-115r0,-105v-14,2,-39,-7,-42,6r-21,99r63,0","w":332},"\u00d8":{"d":"19,-155v0,-101,95,-142,170,-99v5,-18,27,-17,51,-16v4,-1,5,4,3,7r-27,37v17,26,16,70,16,114v0,99,-91,140,-169,99v-6,17,-27,18,-51,16v-4,1,-5,-4,-3,-7r27,-37v-18,-27,-17,-69,-17,-114xm155,-207v-35,-25,-82,2,-74,52r1,50xm97,-60v36,23,82,0,73,-52r0,-50","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"\u00b1":{"d":"138,-163v20,3,53,-7,63,6v-3,13,7,38,-7,38r-56,0r0,56v-1,14,-26,4,-38,7v-4,0,-6,-2,-6,-7r0,-56r-56,0v-14,-1,-4,-26,-7,-38v9,-14,43,-3,63,-6r0,-55v1,-15,25,-5,38,-8v4,0,6,3,6,8r0,55xm201,-24v-2,11,6,31,-7,31r-156,0v-13,0,-5,-20,-7,-31v0,-4,2,-6,7,-6r156,0v5,0,7,2,7,6"},"\u00a5":{"d":"17,-139v-12,-3,-10,-39,0,-40r32,0r-41,-84v0,-3,1,-5,5,-5v20,3,53,-9,60,7r43,97r43,-97v8,-15,40,-3,60,-7v5,0,5,3,5,8r-40,81v13,2,36,-6,38,7v-2,11,6,33,-7,33r-51,0r-17,37r68,0v12,1,5,22,7,34v0,4,-2,7,-7,6r-68,0r0,55v-5,15,-38,4,-55,7v-4,0,-7,-3,-7,-7r0,-55r-68,0v-13,0,-5,-22,-7,-33v0,-4,3,-7,7,-7r68,0v-3,-15,-12,-24,-17,-37r-51,0"},"\u00b5":{"d":"148,-206v17,3,48,-7,51,8r0,180v-16,26,-80,22,-119,18r0,62v-5,14,-35,4,-52,7v-4,0,-7,-3,-7,-7r1,-260v2,-16,34,-5,50,-8v4,-1,9,4,8,8r0,119v-6,36,32,38,60,32r0,-151v1,-3,3,-9,8,-8","w":220},"\u00aa":{"d":"62,-270v33,0,54,14,53,48r0,72v-26,20,-107,20,-103,-31v3,-31,30,-37,65,-36v6,-31,-28,-19,-52,-19v-7,-2,-3,-15,-4,-23v4,-11,27,-11,41,-11xm48,-181v-2,16,15,16,29,14v-3,-10,8,-31,-8,-29v-13,1,-20,3,-21,15","w":128},"\u00ba":{"d":"69,-270v42,0,57,27,56,72v-1,38,-19,58,-56,59v-41,0,-59,-26,-57,-71v2,-38,19,-60,57,-60xm69,-171v18,1,17,-19,17,-39v0,-18,-3,-28,-17,-28v-18,0,-20,19,-19,40v0,17,4,26,19,27","w":136},"\u00e6":{"d":"213,-209v68,0,92,44,88,114v0,3,-5,8,-8,7r-112,0v-9,59,59,40,106,40v12,0,4,26,5,38v-34,13,-100,23,-128,-3v-50,28,-154,25,-149,-53v3,-50,51,-58,108,-57v7,-50,-44,-36,-87,-35v-11,-3,-10,-41,1,-44v42,-12,95,-12,120,14v15,-13,30,-21,56,-21xm213,-164v-25,0,-33,18,-32,44r64,0v1,-27,-9,-45,-32,-44xm70,-66v-2,30,34,33,55,23r0,-48v-28,-1,-53,0,-55,25","w":317},"\u00f8":{"d":"16,-90v0,-73,22,-119,90,-119v21,0,39,4,54,14v7,-11,20,-32,41,-20v-5,15,-17,23,-25,35v18,20,20,52,20,90v0,80,-81,115,-144,79v-8,12,-21,33,-42,21v7,-13,18,-24,26,-36v-13,-16,-20,-37,-20,-64xm128,-151v-39,-28,-65,19,-53,72xm84,-55v33,27,64,-10,54,-60v0,-3,-1,-7,-1,-12","w":211},"\u00bf":{"d":"85,-206v16,3,45,-7,50,6v-3,17,8,48,-7,53v-17,-3,-46,7,-50,-7v3,-17,-7,-47,7,-52xm81,-118v9,-12,60,-15,52,10v4,53,-47,61,-49,110v5,25,40,11,70,10v12,4,4,32,5,46v-51,19,-150,21,-142,-56v6,-52,60,-65,64,-120","w":172,"k":{"Y":31,"V":21}},"\u00a1":{"d":"28,-206v16,3,44,-7,49,7v-3,17,7,47,-7,52v-16,-3,-45,7,-49,-7v3,-17,-7,-47,7,-52xm79,63v-4,14,-36,4,-53,7v-4,0,-7,-3,-7,-7r7,-180v2,-12,43,-13,46,0","w":98,"k":{"Y":20,"V":4}},"\u00ac":{"d":"192,-209v4,0,7,2,7,6r0,132v-2,13,-25,5,-38,7v-4,0,-6,-3,-6,-7r0,-94r-114,0v-15,-1,-5,-25,-8,-38v0,-4,3,-6,8,-6r151,0"},"\u00ab":{"d":"245,-30v4,2,2,8,-3,7v-18,-2,-43,4,-55,-4v-20,-26,-45,-47,-61,-76v16,-30,42,-50,61,-76v12,-9,37,-2,55,-4v5,0,7,4,3,7r-63,73xm135,-30v4,2,2,8,-3,7v-18,-2,-43,4,-55,-4v-20,-26,-45,-47,-61,-76v16,-30,42,-50,61,-76v12,-9,37,-2,55,-4v5,0,7,4,3,7r-63,73","w":258},"\u00bb":{"d":"242,-112v6,6,5,12,0,18r-58,67v-12,9,-36,2,-54,4v-5,1,-7,-5,-3,-7r63,-73r-65,-76v11,-8,45,-6,59,0xm133,-112v4,5,4,13,0,18r-58,67v-11,9,-37,2,-54,4v-5,1,-8,-4,-4,-7r63,-73r-65,-76v11,-8,46,-6,60,0","w":258},"\u00a0":{},"\u00c0":{"d":"180,-231r54,225v0,4,-2,6,-6,6v-19,-3,-51,8,-58,-7r-13,-59r-74,0r-13,59v-7,15,-39,4,-57,7v-5,0,-6,-3,-6,-8r54,-223v4,-46,77,-50,106,-25v6,6,10,14,13,25xm147,-115v-9,-34,-13,-75,-26,-105v-2,0,-5,2,-6,6r-21,99r53,0xm162,-292v1,2,2,7,-2,6v-16,-2,-38,5,-47,-4v-15,-15,-32,-29,-45,-47v15,-3,49,-6,61,3","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"G":7,"C":7}},"\u00c3":{"d":"118,-334v9,5,34,31,38,7v-5,-18,17,-12,31,-13v7,0,6,7,6,13v5,49,-59,53,-85,25v-10,-11,-25,-8,-23,10v1,13,-20,6,-31,7v-6,1,-5,-7,-5,-13v-5,-40,38,-51,69,-36xm180,-231r54,225v0,4,-2,6,-6,6v-19,-3,-51,8,-58,-7r-13,-59r-74,0r-13,59v-7,15,-39,4,-57,7v-5,0,-6,-3,-6,-8r54,-223v4,-46,77,-50,106,-25v6,6,10,14,13,25xm147,-115v-9,-34,-13,-75,-26,-105v-2,0,-5,2,-6,6r-21,99r53,0","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"G":7,"C":7}},"\u00d5":{"d":"125,-334v9,5,34,29,38,7v-5,-18,17,-12,31,-13v7,-1,5,7,5,13v6,50,-58,51,-84,25v-10,-10,-26,-9,-23,10v-1,11,-21,4,-31,6v-7,0,-6,-7,-6,-13v-3,-39,41,-53,70,-35xm126,-271v87,0,106,64,106,159v0,73,-39,115,-106,115v-83,1,-107,-62,-107,-158v0,-74,39,-116,107,-116xm126,-51v51,0,44,-54,44,-104v0,-38,-9,-61,-44,-62v-50,-1,-46,54,-45,105v1,36,9,61,45,61","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"\u00f7":{"d":"95,-246v16,3,44,-7,49,7v-3,15,7,43,-7,47v-16,-3,-44,7,-49,-7v2,-16,-7,-44,7,-47xm33,-125v2,-13,-6,-38,8,-38r151,0v14,1,4,26,7,38v0,4,-2,6,-7,6r-151,0v-5,0,-8,-2,-8,-6xm95,-85v16,3,44,-7,49,7v-3,15,7,43,-7,47v-16,-2,-43,6,-49,-6v3,-16,-7,-44,7,-48"},"\u00ff":{"d":"198,-206v5,-1,7,3,7,8r-61,212v-10,40,-29,59,-78,59v-17,0,-47,0,-52,-13v2,-13,-6,-36,8,-36v32,0,71,12,72,-26v-26,0,-31,-9,-39,-34r-47,-165v0,-4,2,-5,7,-5r48,0v4,0,5,1,6,6v13,47,20,100,37,143r4,0r33,-143v8,-14,38,-3,55,-6xm122,-270v5,-14,48,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33xm44,-270v6,-13,47,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33","w":213,"k":{"\u00e6":9,"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e7":10,"\u00e5":9,"\u00e3":9,"\u00e4":9,"\u00e2":9,"\u00e0":9,"\u00e1":9,"o":8,"e":7,"c":10,"a":9}},"\u20ac":{"d":"104,-93v3,47,50,45,97,40v14,2,4,29,7,42v-8,15,-33,14,-58,14v-65,0,-104,-35,-109,-96v-18,3,-18,-8,-17,-23v0,-8,8,-7,16,-7r0,-22v-16,3,-17,-8,-16,-23v0,-8,8,-9,17,-8v6,-61,47,-94,109,-94v27,0,50,-2,58,14v-3,14,8,41,-8,42v-42,-6,-93,-9,-96,38r76,0v12,1,3,15,2,23v-2,5,-4,8,-7,8r-73,0r0,22r66,0v11,1,0,19,0,27v-15,7,-44,1,-64,3"},"\u00c2":{"d":"191,-292v2,2,1,6,-2,6v-16,-2,-37,4,-46,-5r-22,-25v-11,9,-18,25,-32,30v-12,-3,-40,7,-39,-6v15,-15,21,-39,42,-48r63,1v13,14,24,32,36,47xm180,-231r54,225v0,4,-2,6,-6,6v-19,-3,-51,8,-58,-7r-13,-59r-74,0r-13,59v-7,15,-39,4,-57,7v-5,0,-6,-3,-6,-8r54,-223v4,-46,77,-50,106,-25v6,6,10,14,13,25xm147,-115v-9,-34,-13,-75,-26,-105v-2,0,-5,2,-6,6r-21,99r53,0","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"G":7,"C":7}},"\u00ca":{"d":"182,-292v2,2,1,6,-2,6v-15,-2,-38,5,-46,-5r-22,-25v-11,9,-18,25,-32,30v-12,-3,-40,7,-39,-6r36,-47v21,0,58,-6,73,4xm181,-50v15,1,5,27,8,41v-11,17,-44,11,-77,12v-56,2,-88,-21,-88,-77r0,-120v-6,-84,83,-83,157,-72v15,2,5,27,8,41v0,5,-3,7,-8,7v-35,6,-98,-18,-96,24r0,33r94,0v14,2,5,28,7,41v1,5,-3,8,-7,8r-94,0v2,27,-10,62,23,62r73,0","w":208},"\u00c1":{"d":"180,-231r54,225v0,4,-2,6,-6,6v-19,-3,-51,8,-58,-7r-13,-59r-74,0r-13,59v-7,15,-39,4,-57,7v-5,0,-6,-3,-6,-8r54,-223v4,-46,77,-50,106,-25v6,6,10,14,13,25xm147,-115v-9,-34,-13,-75,-26,-105v-2,0,-5,2,-6,6r-21,99r53,0xm175,-339v5,-1,4,3,2,5v-18,16,-31,36,-52,48v-14,-1,-32,3,-42,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"G":7,"C":7}},"\u00cb":{"d":"181,-50v15,1,5,27,8,41v-11,17,-44,11,-77,12v-56,2,-88,-21,-88,-77r0,-120v-6,-84,83,-83,157,-72v15,2,5,27,8,41v0,5,-3,7,-8,7v-35,6,-98,-18,-96,24r0,33r94,0v14,2,5,28,7,41v1,5,-3,8,-7,8r-94,0v2,27,-10,62,23,62r73,0xm120,-329v5,-14,48,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33xm42,-329v6,-13,47,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33","w":208},"\u00c8":{"d":"181,-50v15,1,5,27,8,41v-11,17,-44,11,-77,12v-56,2,-88,-21,-88,-77r0,-120v-6,-84,83,-83,157,-72v15,2,5,27,8,41v0,5,-3,7,-8,7v-35,6,-98,-18,-96,24r0,33r94,0v14,2,5,28,7,41v1,5,-3,8,-7,8r-94,0v2,27,-10,62,23,62r73,0xm141,-292v1,2,2,7,-2,6v-16,-2,-38,5,-47,-4v-15,-15,-32,-29,-45,-47v15,-3,49,-6,61,3","w":208},"\u00cd":{"d":"32,-268v18,3,49,-8,55,7r0,254v-5,15,-38,3,-55,7v-4,0,-7,-3,-7,-7r0,-254v0,-4,3,-7,7,-7xm114,-339v5,-1,4,3,2,5v-18,16,-31,36,-52,48v-14,-1,-32,3,-42,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","w":111},"\u00ce":{"d":"127,-292v1,2,2,7,-2,6v-15,-2,-38,5,-46,-4r-23,-25v-10,9,-17,24,-31,29v-13,-1,-31,3,-41,-2v11,-18,25,-34,38,-50v21,0,58,-6,73,4xm32,-268v18,3,49,-8,55,7r0,254v-5,15,-38,3,-55,7v-4,0,-7,-3,-7,-7r0,-254v0,-4,3,-7,7,-7","w":111},"\u00cf":{"d":"32,-268v18,3,49,-8,55,7r0,254v-5,15,-38,3,-55,7v-4,0,-7,-3,-7,-7r0,-254v0,-4,3,-7,7,-7xm70,-329v5,-14,48,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33xm-8,-329v6,-13,47,-12,50,0v-2,14,6,38,-8,40v-14,-2,-38,6,-42,-7r0,-33","w":111},"\u00cc":{"d":"32,-268v18,3,49,-8,55,7r0,254v-5,15,-38,3,-55,7v-4,0,-7,-3,-7,-7r0,-254v0,-4,3,-7,7,-7xm90,-292v1,2,2,7,-2,6v-16,-2,-38,5,-47,-4v-15,-15,-32,-29,-45,-47v15,-3,49,-6,61,3","w":111},"\u00d3":{"d":"126,-271v87,0,106,64,106,159v0,73,-39,115,-106,115v-83,1,-107,-62,-107,-158v0,-74,39,-116,107,-116xm126,-51v51,0,44,-54,44,-104v0,-38,-9,-61,-44,-62v-50,-1,-46,54,-45,105v1,36,9,61,45,61xm182,-339v5,-1,4,3,2,5v-18,16,-31,36,-52,48v-14,-1,-32,3,-42,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"\u00d4":{"d":"194,-292v3,2,2,6,-2,6v-15,-2,-37,5,-45,-5r-23,-25v-11,9,-18,25,-32,30v-12,-3,-40,7,-39,-6r37,-47v21,-1,58,-6,73,4xm126,-271v87,0,106,64,106,159v0,73,-39,115,-106,115v-83,1,-107,-62,-107,-158v0,-74,39,-116,107,-116xm126,-51v51,0,44,-54,44,-104v0,-38,-9,-61,-44,-62v-50,-1,-46,54,-45,105v1,36,9,61,45,61","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"\u00d2":{"d":"126,-271v87,0,106,64,106,159v0,73,-39,115,-106,115v-83,1,-107,-62,-107,-158v0,-74,39,-116,107,-116xm126,-51v51,0,44,-54,44,-104v0,-38,-9,-61,-44,-62v-50,-1,-46,54,-45,105v1,36,9,61,45,61xm156,-292v1,2,2,7,-2,6v-16,-2,-38,5,-47,-4v-15,-15,-32,-29,-45,-47v15,-3,49,-6,61,3","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"\u00da":{"d":"178,-268v18,3,49,-7,54,7r0,161v1,71,-35,103,-104,103v-69,0,-104,-33,-104,-103r0,-161v5,-15,37,-4,54,-7v5,0,8,2,8,7r0,161v-2,35,10,52,42,52v33,0,42,-18,42,-52r0,-161v0,-5,3,-7,8,-7xm189,-339v5,-1,4,3,2,5v-18,16,-31,36,-52,48v-14,-1,-32,3,-42,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","w":255,"k":{"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"A":7}},"\u00db":{"d":"198,-292v3,2,2,6,-2,6v-15,-2,-37,5,-45,-5r-23,-25v-11,9,-18,25,-32,30v-12,-3,-40,7,-39,-6v15,-15,21,-39,42,-48r63,1v13,14,24,32,36,47xm178,-268v18,3,49,-7,54,7r0,161v1,71,-35,103,-104,103v-69,0,-104,-33,-104,-103r0,-161v5,-15,37,-4,54,-7v5,0,8,2,8,7r0,161v-2,35,10,52,42,52v33,0,42,-18,42,-52r0,-161v0,-5,3,-7,8,-7","w":255,"k":{"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"A":7}},"\u00d9":{"d":"178,-268v18,3,49,-7,54,7r0,161v1,71,-35,103,-104,103v-69,0,-104,-33,-104,-103r0,-161v5,-15,37,-4,54,-7v5,0,8,2,8,7r0,161v-2,35,10,52,42,52v33,0,42,-18,42,-52r0,-161v0,-5,3,-7,8,-7xm164,-292v1,2,2,7,-2,6v-16,-2,-38,5,-47,-4v-15,-15,-32,-29,-45,-47v15,-3,49,-6,61,3","w":255,"k":{"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"A":7}},"\u00b8":{"d":"113,13v5,-1,4,3,2,5r-48,48v-15,-1,-35,3,-46,-2v12,-19,23,-40,44,-51r48,0","w":153},"\u00a6":{"d":"30,-262v17,3,47,-7,52,7r0,124v-3,16,-35,5,-52,8v-4,1,-8,-5,-7,-8r0,-124v0,-4,3,-7,7,-7xm30,-63v17,3,47,-7,52,7r0,124v-3,16,-35,5,-52,8v-4,1,-8,-5,-7,-8r0,-124v0,-4,3,-7,7,-7","w":104},"\u00d0":{"d":"114,-271v89,0,115,58,115,156v0,107,-86,133,-193,113v-7,-1,-11,-6,-11,-13r0,-97v-10,-1,-26,4,-26,-7v1,-21,-8,-50,26,-42r0,-91v0,-7,4,-12,11,-13v22,-4,48,-6,78,-6xm87,-50v71,10,79,-31,79,-102v0,-56,-24,-69,-79,-65r0,56v11,1,28,-4,29,7v-2,14,6,39,-7,42r-22,0r0,62","w":245},"\u00f0":{"d":"119,-253v52,28,79,77,77,160v-1,61,-29,96,-89,96v-65,0,-91,-38,-91,-107v0,-68,43,-107,108,-93v-8,-10,-21,-20,-40,-29v-14,11,-36,32,-45,5v4,-7,13,-11,18,-17v-30,-3,-22,-15,-14,-37v13,-10,32,6,50,10v14,-13,37,-34,49,-8v-5,8,-16,14,-23,20xm107,-46v29,1,32,-26,31,-58v0,-30,-5,-48,-32,-48v-30,0,-32,26,-32,59v0,28,7,47,33,47","w":211},"\u00dd":{"d":"220,-268v4,0,5,3,5,8v-22,47,-39,100,-65,143v-4,4,-8,8,-13,10r0,100v-4,15,-37,4,-54,7v-3,0,-8,-3,-7,-7r0,-100v-12,-6,-17,-14,-24,-28r-55,-127v8,-14,40,-3,58,-6v3,0,5,3,7,7r41,105v4,3,7,-1,9,-4r38,-101v9,-15,40,-4,60,-7xm180,-339v5,-1,4,3,2,5v-18,16,-31,36,-52,48v-14,-1,-32,3,-42,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","k":{"\u00fd":15,"\u00d2":16,"\u00d4":16,"\u00d3":16,"\u00c8":13,"\u00cb":13,"\u00c1":27,"\u00ca":13,"\u00c2":27,"\u00ff":15,"\u00d5":16,"\u00c3":27,"\u00c0":27,"\u00e6":32,"\u00d8":16,"\u00c6":27,"\u00fc":24,"\u00fb":24,"\u00f9":24,"\u00fa":24,"\u00f5":35,"\u00f6":35,"\u00f4":35,"\u00f2":35,"\u00f3":35,"\u00eb":34,"\u00ea":34,"\u00e8":34,"\u00e9":34,"\u00e5":32,"\u00e3":32,"\u00e4":32,"\u00e2":32,"\u00e0":32,"\u00e1":32,"\u00d6":16,"\u00c9":13,"\u00c7":18,"\u00c5":27,"\u00c4":27,"y":15,"v":17,"u":24,"o":35,"e":34,"a":32,"Q":16,"O":16,"E":13,"C":18,"A":27}},"\u00fd":{"d":"198,-206v5,-1,7,3,7,8r-61,212v-10,40,-29,59,-78,59v-17,0,-47,0,-52,-13v2,-13,-6,-36,8,-36v32,0,71,12,72,-26v-26,0,-31,-9,-39,-34r-47,-165v0,-4,2,-5,7,-5r48,0v4,0,5,1,6,6v13,47,20,100,37,143r4,0r33,-143v8,-14,38,-3,55,-6xm172,-280v5,-1,4,3,2,5v-18,16,-31,36,-52,48v-14,-1,-32,3,-42,-2v10,-20,26,-33,39,-50v15,-3,36,0,53,-1","w":213,"k":{"\u00e6":9,"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e7":10,"\u00e5":9,"\u00e3":9,"\u00e4":9,"\u00e2":9,"\u00e0":9,"\u00e1":9,"o":8,"e":7,"c":10,"a":9}},"\u00de":{"d":"86,-239v73,-6,141,13,137,90v-3,73,-59,93,-137,87r0,55v-5,15,-37,4,-54,7v-4,0,-7,-3,-7,-7r0,-254v5,-15,37,-4,54,-7v11,1,6,18,7,29xm86,-113v40,1,75,2,75,-40v0,-38,-37,-35,-75,-35r0,75","w":234},"\u00fe":{"d":"80,-207v82,-12,120,28,120,117v0,70,-48,104,-120,90r0,63v-5,15,-35,4,-51,7v-3,0,-8,-3,-7,-7r0,-332v5,-15,35,-4,51,-7v4,0,7,3,7,7r0,62xm110,-45v30,3,33,-35,32,-71v-1,-45,-22,-49,-62,-43r0,112v11,1,21,2,30,2","w":214},"\u00d7":{"d":"190,-98v8,15,-16,25,-25,34v-20,-12,-32,-32,-49,-46v-16,15,-30,33,-48,46v-12,-7,-20,-18,-29,-28v12,-20,32,-32,46,-49v-15,-16,-33,-30,-46,-48v8,-12,18,-21,29,-29v18,13,32,31,48,46v17,-15,30,-34,49,-46v9,9,32,19,25,34r-43,43"},"\u00b9":{"d":"14,-249v13,-12,46,-27,65,-15r0,140v-4,9,-23,2,-34,4v-2,0,-4,-1,-4,-4r0,-107v-9,2,-20,13,-27,8r0,-26","w":116},"\u00b2":{"d":"15,-259v26,-18,105,-20,98,28v3,39,-57,46,-64,78v20,3,52,-6,63,5v-2,9,5,28,-5,28r-88,0v-20,-39,17,-83,49,-96v14,-10,10,-28,-13,-23v-18,0,-47,12,-40,-20","w":127},"\u00b3":{"d":"15,-260v28,-19,98,-19,98,31v0,14,-6,24,-17,32v36,23,10,84,-37,77v-22,-2,-52,2,-45,-29v12,-14,60,13,62,-18v1,-25,-30,-12,-49,-15v-9,-1,-4,-15,-5,-24v4,-16,58,9,54,-20v-3,-22,-27,-11,-56,-11v-9,-1,-4,-15,-5,-23","w":126},"\u00bd":{"d":"182,-137v27,-19,104,-20,98,28v3,39,-59,44,-65,77r58,0v9,0,8,29,0,32r-88,0v-17,-24,4,-72,29,-81v10,-8,27,-11,29,-27v-3,-30,-70,19,-61,-29xm230,-268v3,0,4,5,2,8r-154,260v-11,3,-28,0,-41,1v-5,1,-5,-5,-3,-8r154,-259v10,-5,29,-1,42,-2xm14,-249v13,-12,46,-27,65,-15r0,140v-4,9,-23,2,-34,4v-2,0,-4,-1,-4,-4r0,-107v-9,2,-20,13,-27,8r0,-26","w":293},"\u00bc":{"d":"255,-61v6,0,15,-2,16,4v0,14,4,30,-16,25v-1,11,4,29,-5,32v-11,-2,-29,5,-32,-5r0,-27v-19,-2,-46,5,-58,-4v1,-10,-2,-23,3,-29r59,-80v7,-3,33,-7,33,5r0,79xm230,-268v3,0,4,5,2,8r-154,260v-11,3,-28,0,-41,1v-5,1,-5,-5,-3,-8r154,-259v10,-5,29,-1,42,-2xm219,-61v-1,-13,2,-30,-1,-41v-9,14,-21,25,-29,40v7,3,21,0,30,1xm14,-249v13,-12,46,-27,65,-15r0,140v-4,9,-23,2,-34,4v-2,0,-4,-1,-4,-4r0,-107v-9,2,-20,13,-27,8r0,-26","w":284},"\u00be":{"d":"280,-61v6,1,15,-2,16,4v0,14,4,29,-16,25v-2,11,5,30,-5,32v-11,-2,-29,5,-32,-5r0,-27r-52,0v-10,-2,-5,-24,-3,-33r59,-80v7,-3,33,-7,33,5r0,79xm255,-268v3,0,4,5,2,8r-154,259v-11,3,-28,0,-41,1v-5,1,-5,-5,-3,-8r154,-258v10,-5,29,-1,42,-2xm15,-260v28,-19,98,-19,98,31v0,14,-6,24,-17,32v36,23,10,84,-37,77v-22,-2,-52,2,-45,-29v12,-14,60,13,62,-18v1,-25,-30,-12,-49,-15v-9,-1,-4,-15,-5,-24v4,-16,58,9,54,-20v-3,-22,-27,-11,-56,-11v-9,-1,-4,-15,-5,-23xm245,-61v-1,-13,2,-30,-1,-41v-10,14,-22,25,-30,40v8,3,21,0,31,1","w":309},"\u00ad":{"d":"89,-131v13,1,6,23,8,36v-1,4,-3,6,-8,6r-69,0v-15,1,-6,-23,-8,-35v0,-5,3,-7,8,-7r69,0","w":108},"\u00af":{"d":"199,-310v13,1,9,29,0,29r-203,0v-11,1,-6,-14,-7,-23v0,-4,2,-6,7,-6r203,0","w":194},"\u00b7":{"d":"28,-167v16,3,45,-7,50,7v-3,17,8,48,-8,52v-16,-3,-45,7,-49,-7v3,-17,-7,-48,7,-52","w":98},"\u00a4":{"d":"178,-224v13,-7,34,18,29,29r-31,30v12,20,12,44,0,64v11,12,24,21,33,35v-8,9,-18,31,-32,24r-31,-31v-17,10,-42,9,-60,0v-13,9,-24,33,-40,31v-6,-9,-28,-17,-20,-30r31,-30v-11,-18,-12,-42,-2,-61v-9,-13,-33,-24,-31,-40v10,-6,17,-28,30,-20r30,30v19,-12,45,-12,64,-1xm117,-104v16,0,31,-15,31,-31v0,-16,-15,-31,-31,-30v-18,0,-29,13,-30,30v-1,16,14,31,30,31"}}});
/*!
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * Digitized data (C) 2004 Agfa Monotype Corporation. Neo Sans(TM) is a trademark
 * of Agfa Monotype Corporation and may be registered in certain jurisdictions. 
 * All rights reserved. Neo Sans is designed by Sebastian Lester.
 * 
 * Trademark:
 * Neo Sans(TM) is a trademark of Agfa Monotype Corporation and may be registered
 * in certain jurisdictions.
 * 
 * Manufacturer:
 * Agfa Monotype Corporation
 * 
 * Designer:
 * Sebastian Lester
 * 
 * Vendor URL:
 * http://www.agfamonotype.com
 * 
 * License information:
 * http://www.agfamonotype.com/html/type/license.html
 */
Cufon.registerFont({"w":217,"face":{"font-family":"Neo Sans","font-weight":400,"font-style":"italic","font-stretch":"normal","units-per-em":"360","panose-1":"2 11 5 4 2 2 2 9 2 4","ascent":"288","descent":"-72","x-height":"2","bbox":"-22.8334 -353 336.168 79.1987","underline-thickness":"17.9297","underline-position":"-27.0703","slope":"-10","unicode-range":"U+0020-U+20AC"},"glyphs":{" ":{"w":98},"!":{"d":"69,-264v3,-10,35,-11,33,0r-36,187v0,9,-26,11,-27,1xm31,-41v3,-9,31,-10,31,0v-5,19,2,48,-31,41v-14,-4,1,-29,0,-41","w":78},"\"":{"d":"144,-271v8,1,27,-5,22,7r-33,68v-2,10,-21,9,-28,4r30,-72v2,-5,5,-7,9,-7xm82,-271v8,1,28,-5,23,7r-33,68v-2,10,-21,9,-28,4v8,-25,20,-48,30,-72v2,-5,4,-7,8,-7","w":130,"k":{".":23,",":23}},"#":{"d":"72,0v-9,-1,-23,4,-21,-7r18,-67v-14,-2,-45,9,-36,-15v5,-13,28,-4,42,-7r19,-73v-18,0,-52,5,-33,-20v10,-4,26,-1,39,-2v10,-25,8,-61,26,-77v8,1,24,-4,21,7r-19,70r56,0r19,-70v0,-10,28,-12,28,0r-19,70v15,2,47,-9,38,15v-5,13,-28,5,-43,7r-20,73v18,0,53,-6,35,20v-10,5,-27,1,-41,2r-18,67v0,11,-24,10,-28,2r18,-69r-56,0r-17,67v-2,5,-4,7,-8,7xm179,-169r-56,0r-20,73r56,0","w":237},"$":{"d":"154,-307v9,1,24,-4,22,7r-5,30v20,1,37,3,52,5v10,2,4,27,-5,27v-52,-3,-136,-16,-118,51v33,41,127,58,97,138v-12,29,-40,44,-74,50v-5,20,3,49,-31,41v-14,-4,1,-28,0,-40v-23,-2,-67,7,-54,-26v1,-4,3,-6,8,-6v60,7,120,12,122,-46v-12,-57,-105,-53,-105,-121v0,-45,35,-67,77,-72v4,-13,-1,-36,14,-38"},"%":{"d":"209,-134v29,-30,92,-10,76,45v-12,43,-11,91,-64,91v-65,0,-37,-111,-12,-136xm256,-266v7,-4,31,-6,22,5r-200,261v-6,1,-31,4,-23,-6r195,-255v3,-3,5,-4,6,-5xm65,-245v21,-43,108,-27,85,33v-7,45,-14,93,-64,92v-60,0,-38,-91,-21,-125xm211,-89v-4,25,-21,71,14,71v32,0,40,-53,40,-86v0,-14,-7,-24,-21,-23v-17,0,-29,13,-33,38xm76,-212v-4,25,-21,72,14,71v36,-2,33,-52,40,-86v0,-14,-7,-23,-21,-23v-17,0,-29,13,-33,38","w":285},"&":{"d":"215,-130v0,-9,26,-9,28,-1v-7,39,-21,68,-39,89v9,13,20,24,28,39v-5,6,-26,4,-35,1r-14,-20v-38,34,-156,40,-153,-32v2,-48,34,-64,66,-83v-14,-20,-29,-35,-29,-65v0,-46,30,-68,78,-68v71,0,93,69,43,105v-12,9,-34,23,-52,33r52,70v15,-17,21,-42,27,-68xm145,-246v-60,-5,-57,67,-24,94v26,-19,66,-24,66,-69v0,-21,-16,-23,-42,-25xm62,-55v-1,49,84,36,107,14r-58,-76v-25,15,-48,25,-49,62","w":244},"'":{"d":"82,-271v8,1,28,-5,23,7r-33,68v-2,10,-21,9,-28,4v8,-25,20,-48,30,-72v2,-5,4,-7,8,-7","w":69,"k":{".":23,",":23}},"(":{"d":"149,-269v-64,71,-115,228,-61,341v-3,6,-24,4,-28,-1v-58,-105,-8,-280,58,-338v6,-7,22,-5,31,-2","w":109},")":{"d":"0,73v65,-70,114,-226,62,-340v47,-16,53,60,53,111v0,93,-34,184,-88,230v-6,1,-22,3,-27,-1","w":109},"*":{"d":"60,-210v-11,-3,-2,-18,3,-21r49,15r-1,-47v-1,-9,8,-7,16,-7v4,0,6,2,6,7r0,47r48,-15v5,3,13,18,3,21r-45,14v8,16,45,42,16,54v-16,-9,-21,-28,-33,-41v-12,14,-28,58,-47,30v8,-16,21,-28,30,-43","w":167},"+":{"d":"207,-154v11,0,13,26,0,26r-62,0r0,62v1,11,-12,6,-20,7v-4,0,-5,-2,-5,-7r0,-62r-62,0v-11,1,-6,-11,-7,-20v0,-4,2,-6,7,-6r62,0r0,-62v-1,-11,12,-6,20,-7v4,0,5,2,5,7r0,62r62,0","w":214},",":{"d":"44,-46v8,1,28,-4,23,6r-42,74v-6,1,-28,5,-23,-6r33,-68v2,-5,5,-6,9,-6","w":76,"k":{"'":23,"\"":23}},"-":{"d":"40,-92v-11,-3,-4,-27,5,-27r72,0v8,2,7,27,-5,27r-72,0","w":119},".":{"d":"30,-41v3,-12,33,-10,31,0v-4,19,2,48,-31,41v-13,-6,0,-28,0,-41","w":76,"k":{"'":23,"\"":23}},"\/":{"d":"144,-268v9,1,26,-3,21,8r-125,253v-3,11,-15,6,-27,7v-5,1,-4,-4,-3,-7r126,-253v2,-5,5,-8,8,-8","w":127,"k":{"\/":12}},"0":{"d":"70,-223v31,-66,169,-66,158,30v-11,94,-17,192,-119,195v-109,3,-67,-165,-39,-225xm81,-158v-7,48,-32,136,32,133v74,-4,73,-95,82,-167v7,-58,-61,-63,-88,-29v-12,14,-21,35,-26,63"},"1":{"d":"149,-265v8,-5,27,-7,28,4r-44,254v-1,10,-17,6,-28,7v-3,0,-6,-2,-5,-7r39,-227v-18,7,-34,16,-54,22v-6,-4,-3,-25,5,-27"},"2":{"d":"86,-263v54,-11,144,-17,141,45v-6,106,-153,84,-162,190r119,0v11,-1,4,19,4,21v0,4,-5,7,-9,7r-143,0v-18,-81,70,-136,129,-167v18,-10,32,-21,30,-49v-3,-43,-75,-23,-115,-21v-8,-4,-3,-25,6,-26"},"3":{"d":"83,-263v61,-11,141,-16,141,47v0,36,-19,65,-46,77v16,9,24,25,24,46v0,91,-103,116,-170,81v3,-7,1,-19,11,-18v70,12,126,7,126,-62v0,-46,-58,-34,-100,-34v-10,0,-5,-12,-4,-19v1,-5,4,-7,8,-7r66,0v34,-1,50,-25,51,-59v1,-28,-19,-32,-48,-32v-12,0,-34,2,-64,6v-9,-2,-5,-24,5,-26"},"4":{"d":"42,-71v-22,2,-13,-31,-4,-41r133,-150v6,-8,38,-12,41,2r-28,161v18,0,45,-6,34,21v-5,12,-25,5,-39,7r-11,64v-2,10,-18,6,-29,7v-4,1,-4,-3,-4,-7r11,-64r-104,0xm151,-99r20,-120v-38,37,-72,78,-106,119v26,3,58,0,86,1"},"5":{"d":"221,-268v11,2,6,28,-5,28r-103,0r-20,78v62,-1,110,7,113,62v4,91,-85,116,-170,96v-11,-2,-6,-25,3,-26v20,2,40,5,64,5v46,1,70,-28,70,-73v1,-49,-64,-34,-111,-37v-4,0,-6,-4,-4,-7r31,-119v1,-4,4,-7,8,-7r124,0"},"6":{"d":"105,2v-108,4,-66,-148,-43,-216v17,-54,94,-64,159,-50v12,3,5,13,4,21v-1,5,-4,6,-9,6v-48,-11,-110,-9,-124,31v-4,12,-9,30,-13,47v55,-14,134,-11,132,53v-1,66,-39,105,-106,108xm110,-24v45,-3,66,-36,68,-80v1,-48,-65,-37,-103,-30v-9,40,-25,114,35,110"},"7":{"d":"203,-268v25,-2,39,23,26,43r-142,220v-6,9,-20,3,-32,5v-6,0,-4,-6,-2,-9r149,-228v-35,-7,-85,2,-124,-2v-12,-1,-5,-29,5,-29r120,0","k":{"\/":36}},"8":{"d":"155,-270v43,0,78,14,79,56v1,37,-20,62,-46,74v15,10,25,25,25,48v0,65,-41,94,-106,94v-43,0,-75,-22,-75,-63v0,-37,20,-66,47,-79v-15,-9,-25,-22,-25,-44v2,-58,43,-86,101,-86xm125,-153v47,0,76,-14,77,-55v1,-30,-21,-36,-52,-35v-37,0,-64,20,-64,56v0,22,14,34,39,34xm112,-25v44,1,69,-23,69,-65v0,-30,-25,-39,-61,-37v-36,2,-54,28,-55,64v0,28,17,38,47,38"},"9":{"d":"156,-270v108,-4,69,150,43,216v-15,38,-45,58,-98,56v-29,-1,-77,7,-65,-26v1,-5,3,-8,9,-7v53,12,118,9,128,-40v2,-10,6,-25,9,-38v-55,15,-133,11,-132,-53v1,-66,40,-105,106,-108xm83,-164v0,50,67,37,104,30v7,-40,25,-109,-36,-109v-42,0,-68,37,-68,79"},":":{"d":"57,-191v2,-11,32,-11,32,0v-5,19,2,50,-31,41v-13,-3,0,-28,-1,-41xm31,-41v3,-9,33,-10,31,0v-4,19,2,50,-31,41v-14,-4,1,-28,0,-41","w":78},";":{"d":"52,-156v4,-21,-3,-50,31,-42v14,4,0,29,0,41v0,10,-28,12,-31,1xm40,-46v9,1,28,-4,23,7r-39,68v-4,10,-19,10,-26,4v9,-26,23,-48,33,-72v2,-5,5,-7,9,-7","w":78},"<":{"d":"189,-60v4,3,6,10,-1,10v-13,0,-24,2,-32,-5r-87,-73v-8,-8,-9,-18,0,-25v33,-26,61,-57,98,-78v11,0,36,-2,22,10r-94,80","w":214},"=":{"d":"67,-168v-11,2,-7,-11,-8,-20v0,-4,3,-6,8,-6r138,0v11,-1,6,12,7,21v0,4,-3,5,-7,5r-138,0xm205,-114v12,1,10,26,0,26r-138,0v-11,1,-7,-11,-8,-20v0,-4,3,-6,8,-6r138,0","w":214},">":{"d":"203,-153v9,7,9,18,0,25v-33,25,-61,57,-98,78v-10,0,-35,1,-22,-10r95,-81r-95,-80v-3,-3,-5,-10,1,-10v13,0,24,-2,32,5","w":214},"?":{"d":"65,-265v45,-9,115,-11,113,39v-3,62,-59,78,-87,119v-6,16,2,45,-31,37v-20,-53,52,-91,76,-125v13,-20,9,-50,-26,-47r-51,4v-8,-3,-5,-27,6,-27xm47,-40v2,-11,33,-12,31,0v-5,18,1,49,-31,40v-14,-4,0,-28,0,-40","w":160},"@":{"d":"51,-174v37,-80,226,-91,226,30v0,89,-47,124,-138,124v-40,0,-65,-16,-58,-56v10,-51,16,-104,81,-99v19,2,49,-3,52,14r-23,113v46,-6,59,-47,62,-97v5,-90,-138,-85,-174,-29v-21,33,-32,79,-35,128v-5,70,75,65,138,65v-2,7,2,17,-7,17v-87,0,-170,-12,-152,-105v8,-36,15,-76,28,-105xm120,-117v-12,37,-21,86,40,71r20,-101v-33,-6,-57,-1,-60,30","w":276},"A":{"d":"218,-8v1,13,-16,6,-27,8v-3,0,-5,-1,-5,-5r-9,-83r-94,0v-14,28,-24,60,-40,86v-7,2,-32,8,-31,-6r108,-235v10,-32,69,-39,73,0xm175,-117r-12,-118v0,-10,-12,-8,-14,0r-54,118r80,0","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"u":4,"t":16,"q":4,"o":4,"g":4,"f":16,"e":4,"d":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"S":6,"Q":9,"O":9,"L":7,"G":8,"C":8}},"B":{"d":"87,-267v67,-7,165,-11,150,72v-6,30,-23,47,-49,57v42,10,34,88,7,110v-24,35,-104,32,-155,27v-8,-1,-12,-7,-9,-13r42,-240v1,-8,6,-12,14,-13xm204,-195v6,-54,-42,-48,-100,-46r-16,89v54,1,111,5,116,-43xm184,-74v11,-57,-46,-55,-101,-52r-17,99v55,5,108,2,118,-47","w":221,"k":{"\u00dd":12,"\u00c6":8,"Y":12,"T":12,"A":7}},"C":{"d":"177,-2v-83,17,-154,-14,-136,-107v16,-82,30,-163,123,-161v17,1,48,0,65,10v-4,7,1,23,-10,23v-41,0,-82,-9,-108,16v-27,26,-37,87,-40,139v-4,62,53,58,112,52v8,3,6,25,-6,28","w":196,"k":{"\u00fd":8,"\u00d2":10,"\u00d4":10,"\u00d3":10,"\u00ff":8,"\u00d5":10,"\u00d8":10,"\u00d6":10,"y":8,"o":4,"Q":10,"O":10,"G":10,"C":6}},"D":{"d":"82,-266v91,-16,172,5,156,108v-14,90,-44,160,-137,160v-29,0,-51,-1,-65,-3v-5,-1,-6,-4,-6,-9r43,-247v1,-5,4,-8,9,-9xm179,-61v27,-53,61,-181,-35,-181v-15,0,-28,0,-40,1r-38,215v44,5,96,-2,113,-35","w":230,"k":{"\u00c1":8,"\u00c2":8,"\u00c3":8,"\u00c0":8,"\u00c6":8,"\u00c5":8,"\u00c4":8,"Z":8,"Y":11,"X":11,"W":4,"V":7,"T":13,"A":8}},"E":{"d":"175,0v-64,5,-153,10,-135,-65v13,-59,16,-131,39,-179v16,-34,108,-26,143,-23v6,4,2,26,-5,27v-48,6,-117,-19,-120,37r-9,50r110,0v8,2,9,28,-5,28r-110,0v-2,38,-39,105,27,98v23,3,57,-6,72,4v-2,7,0,20,-7,23","w":198},"F":{"d":"62,-7v0,9,-30,12,-32,1v15,-76,22,-161,44,-230v14,-24,39,-35,78,-34v34,0,58,1,71,3v4,5,1,25,-6,27v-48,5,-117,-19,-120,37r-9,50r110,0v8,2,9,28,-5,28r-110,0","w":198,"k":{"\u00c1":22,"\u00c2":22,"\u00c3":22,"\u00c0":22,"\u00c6":22,"\u00f5":10,"\u00f6":10,"\u00f4":10,"\u00f2":10,"\u00f3":10,"\u00c5":22,"\u00c4":22,"o":10,"O":4,"A":22,".":33,",":33}},"G":{"d":"186,-3v-86,20,-166,-7,-146,-107v10,-51,21,-113,51,-135v36,-27,91,-28,142,-20v10,2,4,27,-5,27v-39,0,-93,-9,-118,16v-26,26,-36,91,-40,141v-4,54,42,59,95,52r18,-103v0,-11,30,-11,33,-1r-22,122v-1,4,-4,7,-8,8","w":220,"k":{"V":5}},"H":{"d":"230,-260v2,-11,34,-13,32,0r-44,253v0,10,-32,12,-33,0r21,-120r-123,0r-21,120v0,9,-30,12,-32,1r44,-254v0,-10,35,-14,33,0r-19,104r123,0","w":244},"I":{"d":"78,-261v2,-13,35,-10,33,0r-45,254v0,10,-32,12,-33,0","w":96},"J":{"d":"78,-261v2,-11,35,-11,33,0r-49,274v-3,39,-40,60,-83,49v-6,-13,3,-30,23,-24v20,1,23,-8,27,-25","w":92},"K":{"d":"208,-264v9,-6,35,-7,41,0v-41,46,-91,84,-135,127r87,133v-4,7,-31,6,-38,0r-80,-124r-21,121v0,9,-30,12,-32,1r44,-255v1,-9,32,-12,33,0r-20,113","w":218,"k":{"\u00fd":20,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":17,"\u00d4":17,"\u00d3":17,"\u00c8":13,"\u00cb":13,"\u00ca":13,"\u00ff":20,"\u00d5":17,"\u00d8":17,"\u00fc":15,"\u00fb":15,"\u00f9":15,"\u00fa":15,"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"\u00eb":16,"\u00ea":16,"\u00e8":16,"\u00e9":16,"\u00dc":7,"\u00d6":17,"\u00c9":13,"\u00c7":20,"y":20,"w":18,"v":21,"u":15,"t":10,"q":13,"o":13,"f":5,"e":16,"d":16,"c":16,"V":4,"U":7,"T":5,"Q":17,"O":17,"L":6,"G":25,"E":13,"C":25,"-":14}},"L":{"d":"178,-27v7,1,5,25,-3,26v-45,4,-148,17,-137,-48r36,-211v0,-10,35,-14,33,0r-37,211v4,38,71,16,108,22","w":185,"k":{"\u00fd":19,"\u00dd":37,"\u00d9":14,"\u00db":14,"\u00da":14,"\u00d2":16,"\u00d4":16,"\u00d3":16,"\u00c8":7,"\u00cb":7,"\u00ca":7,"\u00ff":19,"\u00d5":16,"\u00d8":16,"\u00ae":21,"\u00eb":8,"\u00ea":8,"\u00e8":8,"\u00e9":8,"\u00dc":14,"\u00d6":16,"\u00c9":7,"y":19,"w":10,"v":18,"o":9,"e":8,"Y":37,"W":13,"V":33,"U":14,"T":36,"S":7,"Q":16,"O":16,"G":14,"E":7,"C":12,"-":14}},"M":{"d":"246,-261v8,-11,49,-12,46,4r-44,250v0,9,-34,12,-32,0r37,-215v-27,38,-49,81,-79,116v-12,4,-37,5,-41,-8r-33,-108r-38,215v-1,9,-34,13,-32,0r43,-250v1,-15,41,-17,45,-4r38,123v1,5,7,5,9,0","w":274,"k":{"\u00dd":13,"Y":13,"V":7}},"N":{"d":"231,-261v1,-9,31,-13,32,0r-45,251v-1,14,-35,14,-43,4r-76,-212r-38,211v0,10,-28,10,-32,3r44,-253v1,-15,40,-16,44,-3r76,211","w":244,"k":{"\u00dd":6,"Y":6,"V":8,"T":12}},"O":{"d":"90,-244v52,-45,164,-31,157,57v-8,96,-35,189,-128,189v-60,0,-91,-47,-78,-113v10,-51,21,-108,49,-133xm93,-194v-18,52,-49,169,31,167v75,-2,81,-87,90,-160v7,-61,-73,-66,-103,-33v-7,7,-14,15,-18,26","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c6":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"P":{"d":"84,-267v70,-9,162,-5,146,80v-13,70,-69,85,-150,79r-18,101v0,9,-31,13,-32,0r43,-251v1,-5,5,-8,11,-9xm84,-135v67,6,116,-6,116,-69v0,-44,-54,-39,-97,-37","w":213,"k":{"\u00c1":22,"\u00c2":22,"\u00c3":22,"\u00c0":22,"\u00e6":8,"\u00c6":25,"\u00f5":7,"\u00f6":7,"\u00f4":7,"\u00f2":7,"\u00f3":7,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e5":8,"\u00e3":8,"\u00e4":8,"\u00e2":8,"\u00e0":8,"\u00e1":8,"\u00c5":22,"\u00c4":22,"o":7,"e":7,"a":8,"Z":12,"A":22,".":38,",":38}},"Q":{"d":"90,-244v51,-46,165,-31,157,57v-9,91,-25,181,-113,189v-2,18,-10,39,16,36v15,-2,35,-3,26,18v-14,16,-87,13,-78,-24r5,-31v-106,-10,-60,-202,-13,-245xm93,-194v-18,52,-49,169,31,167v75,-2,81,-87,90,-160v7,-61,-73,-66,-103,-33v-7,7,-14,15,-18,26","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c6":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"R":{"d":"77,-265v63,-12,162,-11,159,59v-2,50,-27,80,-71,89r47,113v-2,7,-32,7,-36,-1r-45,-107r-51,-1r-18,106v0,9,-31,13,-32,0xm202,-190v16,-57,-53,-51,-99,-49r-18,98v55,5,116,-3,117,-49","w":225,"k":{"\u00fd":7,"\u00dd":15,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":7,"\u00d5":7,"\u00d8":7,"\u00f5":9,"\u00f6":9,"\u00f4":9,"\u00f2":9,"\u00f3":9,"\u00eb":8,"\u00ea":8,"\u00e8":8,"\u00e9":8,"\u00d6":7,"\u00c7":7,"y":7,"o":9,"g":5,"e":8,"c":5,"Y":15,"W":2,"V":12,"T":15,"Q":7,"O":7,"G":7,"C":7}},"S":{"d":"54,-198v-3,-77,89,-77,159,-68v8,2,6,29,-5,28v-56,-5,-145,-9,-115,56v29,32,99,48,100,105v2,78,-85,86,-161,75v-12,-2,-4,-12,-4,-21v12,-14,41,0,68,-4v45,5,81,-34,55,-69v-25,-33,-94,-46,-97,-102","w":197,"k":{"\u00c6":5,"y":6,"x":5,"v":8,"t":14,"Y":8,"W":5,"V":9,"A":7}},"T":{"d":"62,-239v-12,-3,-4,-29,5,-29r173,0v11,1,3,16,3,23v-1,4,-3,6,-8,6r-70,0r-41,232v0,10,-32,12,-33,0r41,-232r-70,0","w":212,"k":{"\u00fd":23,"\u00d2":16,"\u00d4":16,"\u00d3":16,"\u00c8":10,"\u00cb":10,"\u00c1":32,"\u00ca":10,"\u00c2":32,"\u00ff":23,"\u00d5":16,"\u00c3":32,"\u00c0":32,"\u00e6":31,"\u00d8":16,"\u00c6":32,"\u00fc":15,"\u00fb":15,"\u00f9":15,"\u00fa":15,"\u00f5":32,"\u00f6":32,"\u00f4":32,"\u00f2":32,"\u00f3":32,"\u00eb":29,"\u00ea":29,"\u00e8":29,"\u00e9":29,"\u00e5":31,"\u00e3":31,"\u00e4":31,"\u00e2":31,"\u00e0":31,"\u00e1":31,"\u00d6":16,"\u00c9":10,"\u00c5":32,"\u00c4":32,"z":13,"y":23,"x":14,"w":12,"v":12,"u":15,"t":12,"s":28,"r":17,"q":29,"p":14,"o":32,"n":14,"m":14,"g":23,"e":29,"d":30,"c":28,"a":31,"Q":16,"O":16,"G":11,"F":7,"E":10,"C":14,"A":32,".":27,",":27}},"U":{"d":"224,-261v3,-10,34,-12,33,0v-29,105,-1,263,-138,263v-58,0,-87,-38,-75,-99r29,-164v1,-9,32,-12,33,0r-29,164v-8,43,5,73,47,72v47,-2,63,-29,71,-72","w":238,"k":{"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c6":9,"\u00c5":9,"\u00c4":9,"A":9}},"V":{"d":"58,-259v-1,-12,32,-15,33,-3r23,229v0,11,10,9,14,0r103,-229v3,-9,29,-10,34,-1v-32,83,-77,156,-108,238v-12,30,-71,40,-74,0","w":231,"k":{"\u00fd":12,"\u00d2":8,"\u00d4":8,"\u00d3":8,"\u00c8":9,"\u00cb":9,"\u00c1":25,"\u00ca":9,"\u00c2":25,"\u00ff":12,"\u00d5":8,"\u00c3":25,"\u00c0":25,"\u00a1":9,"\u00bf":33,"\u00e6":19,"\u00d8":8,"\u00c6":25,"\u00fc":13,"\u00fb":13,"\u00f9":13,"\u00fa":13,"\u00f5":18,"\u00f6":18,"\u00f4":18,"\u00f2":18,"\u00f3":18,"\u00eb":18,"\u00ea":18,"\u00e8":18,"\u00e9":18,"\u00e5":19,"\u00e3":19,"\u00e4":19,"\u00e2":19,"\u00e0":19,"\u00e1":19,"\u00d6":8,"\u00c9":9,"\u00c5":25,"\u00c4":25,"z":10,"y":12,"x":14,"w":9,"v":9,"u":13,"s":18,"r":12,"q":18,"p":9,"o":18,"n":9,"m":9,"g":17,"e":18,"c":17,"a":19,"S":8,"Q":8,"O":8,"G":8,"E":9,"C":9,"A":25,".":27,",":27}},"W":{"d":"206,-165r13,138v29,-74,51,-158,78,-234v3,-10,28,-11,34,-2r-83,246v-3,23,-56,28,-59,0r-14,-136v-28,45,-42,105,-71,149v-13,8,-49,12,-49,-13r3,-243v0,-11,30,-13,33,-2r-4,235r62,-138v6,-18,22,-15,43,-15v9,0,13,5,14,15","w":297,"k":{"\u00d2":5,"\u00d4":5,"\u00d3":5,"\u00c1":16,"\u00c2":16,"\u00d5":5,"\u00c3":16,"\u00c0":16,"\u00bf":19,"\u00e6":9,"\u00d8":5,"\u00c6":16,"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"\u00eb":11,"\u00ea":11,"\u00e8":11,"\u00e9":11,"\u00e5":9,"\u00e3":9,"\u00e4":9,"\u00e2":9,"\u00e0":9,"\u00e1":9,"\u00d6":5,"\u00c5":16,"\u00c4":16,"o":13,"e":11,"a":9,"Q":5,"O":5,"G":4,"C":4,"A":16}},"X":{"d":"227,-264v7,-7,39,-7,30,5r-100,124r59,129v0,10,-19,5,-28,5v-19,-34,-34,-73,-52,-108r-83,104v-6,8,-28,8,-36,1v32,-48,72,-88,106,-133r-57,-124v-1,-11,15,-6,24,-7v3,0,5,2,6,4r48,102","w":232,"k":{"\u00fd":13,"\u00d2":16,"\u00d4":16,"\u00d3":16,"\u00ff":13,"\u00d5":16,"\u00d8":16,"\u00fc":12,"\u00fb":12,"\u00f9":12,"\u00fa":12,"\u00f5":12,"\u00f6":12,"\u00f4":12,"\u00f2":12,"\u00f3":12,"\u00eb":10,"\u00ea":10,"\u00e8":10,"\u00e9":10,"\u00d6":16,"y":13,"v":15,"u":12,"o":12,"e":10,"Q":16,"O":16,"G":13,"C":13}},"Y":{"d":"59,-261v1,-12,31,-9,33,-1r29,116v4,14,10,12,16,0r71,-116v3,-9,30,-10,36,-1v-24,45,-54,86,-80,130v-8,13,-16,20,-24,23r-18,103v0,11,-16,6,-27,7v-3,0,-5,-3,-5,-7r18,-103v-7,-3,-12,-10,-16,-23","w":209,"k":{"\u00fd":20,"\u00d2":14,"\u00d4":14,"\u00d3":14,"\u00c8":10,"\u00cb":10,"\u00c1":31,"\u00ca":10,"\u00c2":31,"\u00ff":20,"\u00d5":14,"\u00c3":31,"\u00c0":31,"\u00a1":20,"\u00bf":46,"\u00e6":31,"\u00d8":14,"\u00c6":31,"\u00fc":26,"\u00fb":26,"\u00f9":26,"\u00fa":26,"\u00f5":35,"\u00f6":35,"\u00f4":35,"\u00f2":35,"\u00f3":35,"\u00eb":34,"\u00ea":34,"\u00e8":34,"\u00e9":34,"\u00e5":31,"\u00e3":31,"\u00e4":31,"\u00e2":31,"\u00e0":31,"\u00e1":31,"\u00d6":14,"\u00c9":10,"\u00c7":16,"\u00c5":31,"\u00c4":31,"z":25,"y":20,"x":20,"w":20,"v":21,"u":26,"t":13,"s":26,"r":27,"q":35,"p":27,"o":35,"n":17,"m":17,"g":33,"f":13,"e":34,"d":33,"c":33,"a":31,"S":8,"Q":14,"O":14,"G":16,"E":10,"C":16,"A":31,"\/":33,".":33,"-":28,",":33}},"Z":{"d":"201,-268v30,-1,40,30,22,51r-161,185v38,6,90,-2,132,2v11,1,5,30,-5,30r-129,0v-30,2,-38,-33,-20,-54r155,-182v-34,-7,-82,0,-120,-2v-12,0,-5,-15,-4,-23v0,-4,5,-7,9,-7r121,0","w":214,"k":{"\u00fd":11,"\u00d2":11,"\u00d4":11,"\u00d3":11,"\u00ff":11,"\u00d5":11,"\u00e6":8,"\u00d8":11,"\u00fc":12,"\u00fb":12,"\u00f9":12,"\u00fa":12,"\u00f5":11,"\u00f6":11,"\u00f4":11,"\u00f2":11,"\u00f3":11,"\u00eb":12,"\u00ea":12,"\u00e8":12,"\u00e9":12,"\u00e5":8,"\u00e3":8,"\u00e4":8,"\u00e2":8,"\u00e0":8,"\u00e1":8,"\u00d6":11,"y":11,"v":12,"u":12,"o":11,"g":14,"e":12,"c":14,"a":8,"W":4,"Q":11,"O":11,"G":11,"C":9}},"[":{"d":"149,-268v11,2,6,28,-5,27r-41,0r-50,285r41,0v10,-1,5,12,4,19v-11,16,-52,3,-75,7v-4,0,-5,-2,-5,-7r57,-324v0,-4,3,-7,7,-7r67,0","w":117},"\\":{"d":"121,-7v0,10,-14,6,-24,7v-3,0,-6,-2,-6,-7r-37,-254v1,-10,15,-6,25,-7v3,0,3,3,4,8","w":127},"]":{"d":"58,-241v-10,-3,-5,-28,5,-27r67,0v3,0,5,3,5,7r-57,324v-1,5,-4,7,-8,7r-66,0v-9,-2,-8,-25,4,-26r41,0r50,-285r-41,0","w":117},"^":{"d":"207,-210v2,3,2,7,-3,7v-40,6,-47,-31,-69,-49r-42,48v-7,1,-33,6,-29,-6r47,-59v16,0,45,-6,54,6","w":214},"_":{"d":"179,18v9,-1,5,9,4,14v-1,4,-3,6,-8,6r-185,0v-9,0,-7,-9,-5,-15v1,-4,3,-5,8,-5r186,0","w":177},"`":{"d":"127,-230v1,11,-26,5,-27,5r-37,-53v8,-3,31,-6,37,3","w":133},"a":{"d":"192,-192v4,0,7,2,6,8r-31,177v-1,9,-13,7,-23,7v-9,0,-4,-13,-3,-19v-43,42,-136,16,-112,-64v6,-66,31,-119,100,-118v20,0,41,3,63,9xm66,-115v-6,35,-19,91,24,91v22,-1,35,-10,52,-21r22,-125v-54,-13,-90,7,-98,55","w":189,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":11,"t":9,"f":7}},"b":{"d":"91,-197v64,-16,121,11,106,85v-12,61,-28,117,-99,114v-24,-1,-65,4,-71,-14r44,-252v1,-10,31,-12,32,0xm160,-86v8,-36,18,-91,-31,-87v-16,1,-29,1,-43,3r-25,143v61,8,87,0,99,-59","w":194,"k":{"x":8,"t":11,"f":7}},"c":{"d":"174,-197v10,0,5,14,4,21v-19,16,-71,-12,-89,19v-19,18,-23,59,-26,94v-3,45,42,40,82,35v10,2,7,25,-5,27v-67,14,-120,-12,-107,-84v11,-62,28,-116,97,-116v15,0,29,1,44,4","w":162,"k":{"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"o":13}},"d":{"d":"185,-264v0,-9,30,-12,32,-1r-47,259v-69,20,-156,9,-137,-80v14,-64,28,-115,99,-115v14,0,29,2,41,4xm69,-112v-7,39,-16,90,32,87v10,0,24,0,42,-2r25,-143v-53,-10,-89,1,-99,58","w":194},"e":{"d":"71,-178v53,-51,161,-10,124,81v-1,5,-4,8,-8,8r-121,0v-12,34,3,68,41,65r65,-5v8,3,4,26,-6,25v-67,18,-150,3,-132,-82v8,-38,17,-73,37,-92xm129,-173v-34,1,-54,28,-59,60v31,-2,69,4,96,-2v7,-32,-3,-59,-37,-58","w":195,"k":{"\u00fd":7,"\u00ff":7,"y":7,"x":10,"w":2,"v":7,"t":11,"f":7,"T":33}},"f":{"d":"85,-224v0,-46,50,-62,85,-42v5,34,-54,-2,-54,42r-4,26r38,0v10,-1,4,12,4,19v-5,12,-32,3,-47,6r-32,182v-5,35,-21,50,-59,50v-17,0,-33,-1,-25,-20v11,-13,47,6,53,-30r32,-182v-16,-3,-48,6,-38,-19v5,-11,28,-4,42,-6","w":133,"k":{"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":9,"\u00ea":9,"\u00e8":9,"\u00e9":9,"s":5,"q":7,"o":8,"g":8,"e":9,"d":4,"c":8,".":20,",":20}},"g":{"d":"50,-153v17,-48,98,-62,153,-34r-33,187v-1,71,-77,81,-146,65v-10,-2,-3,-11,-3,-19v0,-4,3,-5,8,-5v54,7,108,13,110,-43v-63,16,-124,-9,-106,-84v5,-23,11,-49,17,-67xm69,-112v-6,40,-18,88,34,88v12,0,31,-2,41,-4r24,-142v-56,-14,-92,6,-99,58","w":194},"h":{"d":"91,-195v56,-16,120,1,108,67r-21,121v-1,9,-34,12,-32,0r22,-136v3,-39,-53,-32,-82,-25r-28,161v-1,9,-31,12,-32,0r45,-257v1,-10,31,-12,32,0","w":200,"k":{"\u00fd":7,"\u00ff":7,"y":7,"t":7,"f":7}},"i":{"d":"70,-235v3,-21,0,-45,32,-38v14,9,4,55,-26,43v-4,0,-6,-2,-6,-5xm62,-191v0,-9,30,-12,32,-1r-32,185v-1,9,-34,12,-32,0","w":88},"j":{"d":"75,-266v2,-11,34,-11,33,0v-2,20,-1,44,-33,36v-12,-3,1,-25,0,-36xm62,-191v0,-9,30,-12,32,-1r-38,215v0,40,-47,60,-78,41v-7,-34,47,-2,46,-41","w":88},"k":{"d":"71,-263v1,-12,33,-13,32,0r-26,146r82,-78v6,-5,46,-6,35,5r-93,86r66,99v-1,9,-29,8,-35,0r-59,-89r-15,87v0,11,-30,11,-32,0","w":178,"k":{"\u00e6":13,"\u00fc":11,"\u00fb":11,"\u00f9":11,"\u00fa":11,"\u00f5":14,"\u00f6":14,"\u00f4":14,"\u00f2":14,"\u00f3":14,"\u00eb":14,"\u00ea":14,"\u00e8":14,"\u00e9":14,"\u00e5":13,"\u00e3":13,"\u00e4":13,"\u00e2":13,"\u00e0":13,"\u00e1":13,"u":11,"q":14,"o":14,"g":14,"e":14,"d":14,"c":14,"a":13}},"l":{"d":"61,-7v0,9,-29,12,-31,1r45,-258v1,-12,16,-6,26,-7v3,0,5,3,5,7","w":87},"m":{"d":"176,-184v43,-32,122,-20,110,51r-22,126v0,9,-29,12,-31,1r23,-142v1,-36,-50,-26,-72,-14v-2,58,-16,103,-23,155v0,9,-31,13,-32,0r25,-146v-5,-33,-43,-19,-70,-6r-26,152v0,9,-28,11,-32,2r32,-186v0,-9,29,-12,31,-1r-1,8v28,-19,69,-25,88,0","w":286,"k":{"y":5,"t":7,"f":7}},"n":{"d":"88,-183v43,-34,123,-19,110,57r-20,119v-1,9,-34,12,-32,0r21,-119v15,-56,-46,-54,-83,-33r-26,152v-1,9,-34,13,-32,0r32,-184v1,-10,16,-7,26,-7v8,0,4,10,4,15","w":200,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":7,"f":7}},"o":{"d":"133,-201v63,0,74,58,60,116v-13,57,-41,87,-95,87v-61,0,-74,-57,-60,-115v14,-58,41,-88,95,-88xm69,-113v-7,39,-16,91,33,88v53,-3,61,-55,66,-108v4,-46,-55,-51,-78,-24v-10,11,-18,25,-21,44","w":196,"k":{"\u00fd":8,"\u00ff":8,"z":6,"y":8,"x":13,"w":6,"v":8,"t":11,"f":7}},"p":{"d":"59,-189v67,-28,157,-12,138,77v-13,62,-27,116,-99,114v-14,0,-27,0,-41,-3r-12,65v-1,8,-30,11,-32,0xm160,-86v9,-37,17,-88,-31,-88v-14,0,-32,2,-43,4r-25,142v29,4,65,10,80,-12v9,-11,15,-27,19,-46","w":194,"k":{"\u00fd":7,"\u00ff":7,"y":7,"x":11,"w":5,"t":11,"f":7}},"q":{"d":"55,-161v19,-43,100,-51,148,-26r-44,251v-2,10,-16,4,-26,6v-4,0,-6,-1,-6,-6r12,-65v-80,20,-127,-29,-101,-111v6,-19,11,-35,17,-49xm69,-112v-8,39,-18,88,32,88v13,0,31,-2,43,-4r24,-142v-29,-5,-63,-8,-79,13v-9,12,-16,26,-20,45","w":194},"r":{"d":"87,-182v16,-12,29,-19,54,-19v11,1,5,14,4,22v-13,13,-44,3,-61,21r-26,151v-1,9,-34,13,-32,0r32,-184v0,-9,29,-12,31,-1","w":123,"k":{"\u00e6":10,"\u00f5":9,"\u00f6":9,"\u00f4":9,"\u00f2":9,"\u00f3":9,"\u00eb":9,"\u00ea":9,"\u00e8":9,"\u00e9":9,"\u00e5":10,"\u00e3":10,"\u00e4":10,"\u00e2":10,"\u00e0":10,"\u00e1":10,"q":10,"o":9,"g":9,"e":9,"d":10,"c":9,"a":10,".":11,",":11}},"s":{"d":"74,-102v-56,-32,-22,-107,44,-99v22,3,35,2,53,5v11,2,6,25,-3,25v-36,0,-110,-10,-87,35v22,27,77,34,78,78v1,44,-33,62,-77,60v-29,-2,-69,8,-60,-25v1,-5,4,-5,9,-5v43,7,111,11,92,-39v-11,-12,-33,-26,-49,-35","w":167,"k":{"y":4,"v":5,"t":5,"f":4}},"t":{"d":"43,-175v-11,-2,-6,-23,4,-23r35,0v4,-22,2,-48,34,-45v10,8,-3,31,-2,45r39,0v10,2,5,27,-5,27r-39,0r-23,136v-6,28,52,-8,41,30v-2,10,-20,6,-30,7v-30,1,-48,-15,-42,-48r22,-125","w":135,"k":{"\u00f5":5,"\u00f6":5,"\u00f4":5,"\u00f2":5,"\u00f3":5,"\u00e7":4,"q":5,"o":5,"g":4,"d":4,"c":4}},"u":{"d":"178,-191v0,-9,31,-12,32,0r-32,184v0,9,-29,12,-31,1r1,-8v-45,33,-124,17,-110,-62r20,-115v0,-9,31,-12,32,0r-23,139v1,42,54,27,84,14","w":200},"v":{"d":"48,-189v-1,-13,14,-8,25,-9v3,0,6,2,6,7r12,156v2,17,13,13,18,0r68,-156v4,-12,17,-6,29,-7v5,-1,6,6,4,9r-75,163v-11,34,-66,41,-70,0","w":190,"k":{"\u00e6":8,"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e5":8,"\u00e3":8,"\u00e4":8,"\u00e2":8,"\u00e0":8,"\u00e1":8,"q":8,"o":8,"e":7,"a":8,".":18,",":18}},"w":{"d":"270,-192v4,-9,35,-11,33,3r-65,167v-7,31,-56,34,-59,-2r-11,-124v-28,42,-36,107,-70,143v-14,15,-44,9,-45,-17r-6,-168v0,-10,32,-13,32,-2r3,167v25,-42,41,-96,63,-141v4,-15,48,-18,49,0r11,137v1,6,5,5,6,0","w":283,"k":{"\u00f5":6,"\u00f6":6,"\u00f4":6,"\u00f2":6,"\u00f3":6,"\u00eb":5,"\u00ea":5,"\u00e8":5,"\u00e9":5,"o":6,"e":5,"c":6}},"x":{"d":"55,-189v-2,-4,0,-10,5,-9v11,1,23,-3,27,5r34,67r63,-71v8,-2,39,-4,27,8r-77,87r50,97v-2,8,-30,8,-34,0r-37,-72v-25,25,-45,54,-72,77v-9,-1,-35,4,-24,-8r83,-95","w":196,"k":{"\u00e6":7,"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"\u00eb":13,"\u00ea":13,"\u00e8":13,"\u00e9":13,"\u00e5":7,"\u00e3":7,"\u00e4":7,"\u00e2":7,"\u00e0":7,"\u00e1":7,"q":13,"o":13,"g":13,"f":2,"e":13,"d":13,"c":10,"a":7}},"y":{"d":"179,-193v5,-8,40,-10,33,4r-96,207v-18,35,-27,53,-75,53v-19,0,-45,0,-34,-22v13,-15,49,5,65,-10v9,-5,18,-25,23,-39v-20,0,-26,-8,-28,-28r-18,-162v-1,-12,16,-7,26,-8v2,1,5,3,5,6r15,156v0,8,4,9,11,8","w":192,"k":{"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e7":9,"q":7,"o":8,"g":9,"e":7,"c":9,",":13}},"z":{"d":"59,-198v48,2,149,-16,109,48r-115,121v26,6,65,-1,95,2v9,1,8,27,-5,27v-49,-2,-148,17,-114,-46r117,-123v-25,-6,-63,1,-92,-2v-11,-1,-6,-28,5,-27","w":167,"k":{"\u00f5":6,"\u00f6":6,"\u00f4":6,"\u00f2":6,"\u00f3":6,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"q":4,"o":6,"e":7,"d":5,"c":4}},"{":{"d":"67,-218v-3,-44,58,-64,88,-42v5,36,-51,1,-56,42v-6,47,-8,101,-46,120v34,29,5,84,3,129v0,17,22,11,39,13v8,1,6,26,-5,26v-42,3,-71,-7,-65,-50v5,-35,28,-87,-2,-108r3,-21v35,-17,31,-67,41,-109","w":119},"|":{"d":"57,-261v2,-11,32,-10,32,0r0,324v0,11,-16,6,-26,7v-4,0,-6,-3,-6,-7r0,-324","w":89},"}":{"d":"59,-265v129,-28,25,121,72,156r-4,21v-66,27,10,175,-122,158v-9,-2,-8,-25,4,-26v25,1,42,1,46,-24v7,-46,8,-99,46,-118v-36,-30,-5,-84,-3,-130v1,-18,-22,-12,-38,-13v-11,0,-5,-19,-1,-24","w":119},"~":{"d":"184,-178v6,-14,32,-8,25,10v5,42,-36,58,-66,36v-15,-11,-26,-27,-46,-32v-28,-7,3,38,-32,38v-9,0,-8,-8,-8,-17v0,-40,38,-59,67,-37v15,11,26,26,46,32v17,1,14,-14,14,-30","w":214},"\u00c4":{"d":"218,-8v1,13,-16,6,-27,8v-3,0,-5,-1,-5,-5r-9,-83r-94,0v-14,28,-24,60,-40,86v-7,2,-32,8,-31,-6r108,-235v10,-32,69,-39,73,0xm175,-117r-12,-118v0,-10,-12,-8,-14,0r-54,118r80,0xm192,-327v1,-10,29,-11,28,0v-5,17,2,42,-27,36v-15,-3,-1,-25,-1,-36xm129,-327v0,-10,30,-11,28,0v-3,17,1,42,-28,36v-14,-4,0,-25,0,-36","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"t":16,"o":4,"f":16,"e":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"Q":9,"O":9,"G":8,"C":8}},"\u00c5":{"d":"168,-353v22,0,36,15,36,37v0,21,-15,36,-36,36v-22,0,-37,-15,-37,-36v0,-21,15,-37,37,-37xm168,-297v9,0,19,-10,19,-19v0,-9,-9,-20,-19,-19v-10,-1,-19,10,-19,19v0,10,10,19,19,19xm218,-8v1,13,-16,6,-27,8v-3,0,-5,-1,-5,-5r-9,-83r-94,0v-14,28,-24,60,-40,86v-7,2,-32,8,-31,-6r108,-235v10,-32,69,-39,73,0xm175,-117r-12,-118v0,-10,-12,-8,-14,0r-54,118r80,0","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"t":16,"o":4,"f":16,"e":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"Q":9,"O":9,"G":8,"C":8}},"\u00c7":{"d":"177,-2v-83,17,-154,-14,-136,-107v16,-82,30,-163,123,-161v17,1,48,0,65,10v-4,7,1,23,-10,23v-41,0,-82,-9,-108,16v-27,26,-37,87,-40,139v-4,62,53,58,112,52v8,3,6,25,-6,28xm107,12v8,1,32,-4,26,5v-20,16,-35,37,-58,51v-7,-1,-27,4,-20,-6v18,-16,31,-38,52,-50","w":196,"k":{"\u00fd":8,"\u00d2":10,"\u00d4":10,"\u00d3":10,"\u00ff":8,"\u00d5":10,"\u00d8":10,"\u00d6":10,"y":8,"Q":10,"O":10}},"\u00c9":{"d":"175,0v-64,5,-153,10,-135,-65v13,-59,16,-131,39,-179v16,-34,108,-26,143,-23v6,4,2,26,-5,27v-48,6,-117,-19,-120,37r-9,50r110,0v8,2,9,28,-5,28r-110,0v-2,38,-39,105,27,98v23,3,57,-6,72,4v-2,7,0,20,-7,23xm188,-341v9,-1,35,-5,30,4v-20,16,-35,37,-58,51v-7,-1,-28,2,-20,-6","w":198},"\u00d1":{"d":"240,-321v0,35,-42,50,-64,28v-13,-13,-44,-40,-46,1v0,8,-10,6,-18,6v-7,0,-5,-9,-4,-14v3,-38,41,-51,64,-28v13,13,44,40,46,-1v5,-12,30,-10,22,8xm231,-261v1,-9,31,-13,32,0r-45,251v-1,14,-35,14,-43,4r-76,-212r-38,211v0,10,-28,10,-32,3r44,-253v1,-15,40,-16,44,-3r76,211","w":244},"\u00d6":{"d":"90,-244v52,-45,164,-31,157,57v-8,96,-35,189,-128,189v-60,0,-91,-47,-78,-113v10,-51,21,-108,49,-133xm93,-194v-18,52,-49,169,31,167v75,-2,81,-87,90,-160v7,-61,-73,-66,-103,-33v-7,7,-14,15,-18,26xm195,-328v1,-10,29,-11,28,0v-5,17,2,42,-27,36v-15,-3,-1,-25,-1,-36xm132,-328v0,-10,30,-11,28,0v-3,17,1,42,-28,36v-14,-4,0,-25,0,-36","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"\u00dc":{"d":"224,-261v3,-10,34,-12,33,0v-29,105,-1,263,-138,263v-58,0,-87,-38,-75,-99r29,-164v1,-9,32,-12,33,0r-29,164v-8,43,5,73,47,72v47,-2,63,-29,71,-72xm192,-328v1,-10,29,-11,28,0v-5,17,2,42,-27,36v-15,-3,-1,-25,-1,-36xm129,-328v0,-10,30,-11,28,0v-3,17,1,42,-28,36v-14,-4,0,-25,0,-36","w":238,"k":{"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"A":9}},"\u00e1":{"d":"192,-192v4,0,7,2,6,8r-31,177v-1,9,-13,7,-23,7v-9,0,-4,-13,-3,-19v-43,42,-136,16,-112,-64v6,-66,31,-119,100,-118v20,0,41,3,63,9xm66,-115v-6,35,-19,91,24,91v22,-1,35,-10,52,-21r22,-125v-54,-13,-90,7,-98,55xm169,-279v9,-1,35,-5,30,4v-20,16,-35,37,-58,51v-7,-1,-28,2,-20,-6","w":189,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":7,"t":9,"f":7}},"\u00e0":{"d":"192,-192v4,0,7,2,6,8r-31,177v-1,9,-13,7,-23,7v-9,0,-4,-13,-3,-19v-43,42,-136,16,-112,-64v6,-66,31,-119,100,-118v20,0,41,3,63,9xm66,-115v-6,35,-19,91,24,91v22,-1,35,-10,52,-21r22,-125v-54,-13,-90,7,-98,55xm162,-230v1,11,-26,5,-27,5r-37,-53v8,-3,31,-6,37,3","w":189,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":7,"t":9,"f":7}},"\u00e2":{"d":"198,-230v2,11,-17,6,-25,5r-27,-40v-20,14,-31,50,-68,39v15,-19,33,-36,50,-54v15,2,36,-5,43,5xm192,-192v4,0,7,2,6,8r-31,177v-1,9,-13,7,-23,7v-9,0,-4,-13,-3,-19v-43,42,-136,16,-112,-64v6,-66,31,-119,100,-118v20,0,41,3,63,9xm66,-115v-6,35,-19,91,24,91v22,-1,35,-10,52,-21r22,-125v-54,-13,-90,7,-98,55","w":189,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":7,"t":9,"f":7}},"\u00e4":{"d":"192,-192v4,0,7,2,6,8r-31,177v-1,9,-13,7,-23,7v-9,0,-4,-13,-3,-19v-43,42,-136,16,-112,-64v6,-66,31,-119,100,-118v20,0,41,3,63,9xm66,-115v-6,35,-19,91,24,91v22,-1,35,-10,52,-21r22,-125v-54,-13,-90,7,-98,55xm162,-267v1,-10,29,-11,28,0v-5,17,2,42,-27,36v-15,-3,-1,-25,-1,-36xm99,-267v0,-10,30,-11,28,0v-3,17,1,42,-28,36v-14,-4,0,-25,0,-36","w":189,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":7,"t":9,"f":7}},"\u00e3":{"d":"207,-263v0,35,-43,50,-64,28v-13,-13,-44,-40,-46,1v0,8,-10,6,-18,6v-7,0,-5,-9,-4,-14v3,-38,41,-51,64,-28v13,13,44,40,46,-1v5,-12,30,-10,22,8xm192,-192v4,0,7,2,6,8r-31,177v-1,9,-13,7,-23,7v-9,0,-4,-13,-3,-19v-43,42,-136,16,-112,-64v6,-66,31,-119,100,-118v20,0,41,3,63,9xm66,-115v-6,35,-19,91,24,91v22,-1,35,-10,52,-21r22,-125v-54,-13,-90,7,-98,55","w":189,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":7,"t":9,"f":7}},"\u00e5":{"d":"145,-290v22,0,36,15,36,37v0,21,-15,36,-36,36v-22,0,-37,-15,-37,-36v0,-21,15,-37,37,-37xm145,-234v9,0,19,-10,19,-19v0,-9,-9,-20,-19,-19v-10,-1,-20,9,-19,19v-1,10,10,19,19,19xm192,-192v4,0,7,2,6,8r-31,177v-1,9,-13,7,-23,7v-9,0,-4,-13,-3,-19v-43,42,-136,16,-112,-64v6,-66,31,-119,100,-118v20,0,41,3,63,9xm66,-115v-6,35,-19,91,24,91v22,-1,35,-10,52,-21r22,-125v-54,-13,-90,7,-98,55","w":189,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":7,"t":9,"f":7}},"\u00e7":{"d":"173,-197v10,0,5,14,4,21v-19,16,-71,-12,-89,19v-20,18,-23,59,-26,94v-3,45,42,40,82,35v10,2,7,25,-5,27v-67,14,-117,-11,-107,-84v10,-78,51,-134,141,-112xm85,12v8,2,29,-4,26,5v-20,16,-36,36,-58,51v-7,-1,-28,4,-21,-6v18,-16,31,-39,53,-50","w":162,"k":{"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"o":13}},"\u00e9":{"d":"71,-178v53,-51,161,-10,124,81v-1,5,-4,8,-8,8r-121,0v-12,34,3,68,41,65r65,-5v8,3,4,26,-6,25v-67,18,-150,3,-132,-82v8,-38,17,-73,37,-92xm129,-173v-34,1,-54,28,-59,60v31,-2,69,4,96,-2v7,-32,-3,-59,-37,-58xm173,-279v9,-1,35,-5,30,4v-20,16,-35,37,-58,51v-7,-1,-28,2,-20,-6","w":195,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":7,"f":7}},"\u00e8":{"d":"71,-178v53,-51,161,-10,124,81v-1,5,-4,8,-8,8r-121,0v-12,34,3,68,41,65r65,-5v8,3,4,26,-6,25v-67,18,-150,3,-132,-82v8,-38,17,-73,37,-92xm129,-173v-34,1,-54,28,-59,60v31,-2,69,4,96,-2v7,-32,-3,-59,-37,-58xm154,-230v1,11,-26,5,-27,5r-37,-53v8,-3,31,-6,37,3","w":195,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":7,"f":7}},"\u00ea":{"d":"197,-230v1,2,2,6,-2,6v-32,6,-34,-25,-49,-41v-20,14,-31,50,-68,39v15,-19,33,-36,50,-54v15,2,37,-6,43,5xm71,-178v53,-51,161,-10,124,81v-1,5,-4,8,-8,8r-121,0v-12,34,3,68,41,65r65,-5v8,3,4,26,-6,25v-67,18,-150,3,-132,-82v8,-38,17,-73,37,-92xm129,-173v-34,1,-54,28,-59,60v31,-2,69,4,96,-2v7,-32,-3,-59,-37,-58","w":195,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":7,"f":7}},"\u00eb":{"d":"71,-178v53,-51,161,-10,124,81v-1,5,-4,8,-8,8r-121,0v-12,34,3,68,41,65r65,-5v8,3,4,26,-6,25v-67,18,-150,3,-132,-82v8,-38,17,-73,37,-92xm129,-173v-34,1,-54,28,-59,60v31,-2,69,4,96,-2v7,-32,-3,-59,-37,-58xm164,-267v1,-10,29,-11,28,0v-5,17,2,42,-27,36v-15,-3,-1,-25,-1,-36xm101,-267v0,-10,30,-11,28,0v-3,17,1,42,-28,36v-14,-4,0,-25,0,-36","w":195,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":7,"f":7}},"\u00ed":{"d":"62,-191v0,-9,30,-12,32,-1r-32,185v-1,9,-34,12,-32,0xm115,-279v9,-1,35,-5,30,4v-20,16,-35,37,-58,51v-7,-1,-28,2,-20,-6","w":88},"\u00ec":{"d":"62,-191v0,-9,30,-12,32,-1r-32,185v-1,9,-34,12,-32,0xm106,-230v1,11,-26,5,-27,5r-37,-53v8,-3,31,-6,37,3","w":88},"\u00ee":{"d":"143,-230v2,3,1,6,-3,6v-31,6,-33,-25,-48,-41v-20,14,-31,50,-68,39v14,-20,34,-36,50,-54v15,2,37,-6,43,5xm62,-191v0,-9,30,-12,32,-1r-32,185v-1,9,-34,12,-32,0","w":88},"\u00ef":{"d":"62,-191v0,-9,30,-12,32,-1r-32,185v-1,9,-34,12,-32,0xm109,-267v1,-10,29,-11,28,0v-5,17,2,42,-27,36v-15,-3,-1,-25,-1,-36xm46,-267v0,-10,30,-11,28,0v-3,17,1,42,-28,36v-14,-4,0,-25,0,-36","w":88},"\u00f1":{"d":"189,-263v-3,-14,24,-23,25,-8v1,38,-39,60,-66,36v-11,-10,-37,-40,-44,-7v1,12,-7,16,-20,14v-6,0,-3,-9,-3,-14v2,-39,40,-50,64,-28v11,10,37,39,44,7xm88,-183v43,-34,123,-19,110,57r-20,119v-1,9,-34,12,-32,0r21,-119v15,-56,-46,-54,-83,-33r-26,152v-1,9,-34,13,-32,0r32,-184v1,-10,16,-7,26,-7v8,0,4,10,4,15","w":200,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":8,"t":7}},"\u00f3":{"d":"133,-201v63,0,74,58,60,116v-13,57,-41,87,-95,87v-61,0,-74,-57,-60,-115v14,-58,41,-88,95,-88xm69,-113v-7,39,-16,91,33,88v53,-3,61,-55,66,-108v4,-46,-55,-51,-78,-24v-10,11,-18,25,-21,44xm170,-279v9,-1,35,-5,30,4v-20,16,-35,37,-58,51v-7,-1,-28,2,-20,-6","w":196,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":13,"w":6,"v":8,"t":9}},"\u00f2":{"d":"133,-201v63,0,74,58,60,116v-13,57,-41,87,-95,87v-61,0,-74,-57,-60,-115v14,-58,41,-88,95,-88xm69,-113v-7,39,-16,91,33,88v53,-3,61,-55,66,-108v4,-46,-55,-51,-78,-24v-10,11,-18,25,-21,44xm158,-230v1,11,-26,5,-27,5r-37,-53v8,-3,31,-6,37,3","w":196,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":13,"w":6,"v":8,"t":9}},"\u00f4":{"d":"198,-230v2,11,-17,6,-25,5r-27,-40v-20,14,-31,50,-68,39v15,-19,33,-36,50,-54v15,2,36,-5,43,5xm133,-201v63,0,74,58,60,116v-13,57,-41,87,-95,87v-61,0,-74,-57,-60,-115v14,-58,41,-88,95,-88xm69,-113v-7,39,-16,91,33,88v53,-3,61,-55,66,-108v4,-46,-55,-51,-78,-24v-10,11,-18,25,-21,44","w":196,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":13,"w":6,"v":8,"t":9}},"\u00f6":{"d":"133,-201v63,0,74,58,60,116v-13,57,-41,87,-95,87v-61,0,-74,-57,-60,-115v14,-58,41,-88,95,-88xm69,-113v-7,39,-16,91,33,88v53,-3,61,-55,66,-108v4,-46,-55,-51,-78,-24v-10,11,-18,25,-21,44xm163,-267v1,-10,29,-11,28,0v-5,17,2,42,-27,36v-15,-3,-1,-25,-1,-36xm100,-267v0,-10,30,-11,28,0v-3,17,1,42,-28,36v-14,-4,0,-25,0,-36","w":196,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":13,"w":6,"v":8,"t":9}},"\u00f5":{"d":"188,-263v-5,-16,23,-22,24,-8v3,39,-39,59,-65,36v-11,-10,-38,-41,-45,-7v1,12,-7,16,-20,14v-6,0,-3,-9,-3,-14v2,-39,40,-50,64,-28v11,10,38,39,45,7xm133,-201v63,0,74,58,60,116v-13,57,-41,87,-95,87v-61,0,-74,-57,-60,-115v14,-58,41,-88,95,-88xm69,-113v-7,39,-16,91,33,88v53,-3,61,-55,66,-108v4,-46,-55,-51,-78,-24v-10,11,-18,25,-21,44","w":196,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":13,"w":6,"v":8,"t":9}},"\u00fa":{"d":"178,-191v0,-9,31,-12,32,0r-32,184v0,9,-29,12,-31,1r1,-8v-45,33,-124,17,-110,-62r20,-115v0,-9,31,-12,32,0r-23,139v1,42,54,27,84,14xm173,-279v9,-1,35,-5,30,4v-20,16,-35,37,-58,51v-7,-1,-28,2,-20,-6","w":200},"\u00f9":{"d":"178,-191v0,-9,31,-12,32,0r-32,184v0,9,-29,12,-31,1r1,-8v-45,33,-124,17,-110,-62r20,-115v0,-9,31,-12,32,0r-23,139v1,42,54,27,84,14xm161,-230v1,11,-26,5,-27,5r-37,-53v8,-3,31,-6,37,3","w":200},"\u00fb":{"d":"199,-230v2,3,1,6,-3,6v-31,6,-33,-25,-48,-41v-20,14,-31,50,-68,39v14,-20,33,-37,50,-54v15,2,37,-6,43,5xm178,-191v0,-9,31,-12,32,0r-32,184v0,9,-29,12,-31,1r1,-8v-45,33,-124,17,-110,-62r20,-115v0,-9,31,-12,32,0r-23,139v1,42,54,27,84,14","w":200},"\u00fc":{"d":"178,-191v0,-9,31,-12,32,0r-32,184v0,9,-29,12,-31,1r1,-8v-45,33,-124,17,-110,-62r20,-115v0,-9,31,-12,32,0r-23,139v1,42,54,27,84,14xm165,-267v1,-10,29,-11,28,0v-5,17,2,42,-27,36v-15,-3,-1,-25,-1,-36xm102,-267v0,-10,30,-11,28,0v-3,17,1,42,-28,36v-14,-4,0,-25,0,-36","w":200},"\u00b0":{"d":"101,-270v29,0,51,22,51,51v0,29,-22,51,-51,51v-29,0,-52,-21,-52,-51v0,-29,23,-51,52,-51xm101,-187v18,0,32,-14,32,-32v0,-18,-13,-31,-32,-31v-18,0,-32,12,-32,31v0,19,14,32,32,32","w":123},"\u00a2":{"d":"128,-199v6,-18,-2,-47,29,-40v14,3,-1,27,0,39v19,2,49,-3,37,24v-20,16,-67,-10,-89,18v-17,21,-23,59,-26,93v-4,48,42,42,83,37v10,3,5,27,-6,27v-11,2,-22,2,-34,3v-6,18,2,48,-29,40v-14,-4,1,-29,0,-41v-70,-12,-46,-140,-12,-175v13,-14,29,-23,47,-25"},"\u00a3":{"d":"93,-217v10,-49,97,-65,146,-39v-3,8,-1,22,-12,21v-64,-11,-110,-6,-112,59r-4,23r77,0v11,-1,3,15,3,22v-16,14,-58,2,-85,6v-7,36,-9,75,-30,98r115,0v12,0,3,17,3,21v-1,4,-3,6,-8,6r-143,0v-18,-20,23,-41,20,-70r10,-55v-8,-1,-25,5,-24,-6v0,-17,8,-26,29,-22v4,-22,8,-48,15,-64"},"\u00a7":{"d":"151,-270v21,2,81,-10,65,27v-33,17,-157,-21,-122,60v29,32,99,43,99,99v0,22,-8,40,-19,53v29,89,-63,126,-157,104v-7,-2,-7,-30,6,-28v60,10,145,-1,114,-66v-26,-33,-94,-43,-97,-100v0,-23,9,-35,20,-49v-26,-62,27,-107,91,-100xm153,-52v25,-59,-46,-69,-75,-100v-28,60,46,68,75,100","w":196},"\u00b6":{"d":"155,-95v-71,7,-122,-19,-106,-92v11,-49,43,-81,99,-81r94,0v4,0,5,3,5,7r-58,324v0,9,-18,11,-20,2r55,-313r-21,0r-55,311v0,8,-19,11,-21,2","w":223},"\u00df":{"d":"74,-235v25,-51,148,-56,147,19v-1,38,-20,62,-50,74v20,6,34,28,34,52v0,66,-48,91,-118,91v-11,0,-4,-14,-4,-21v0,-7,13,-4,21,-4v45,0,69,-23,69,-67v0,-31,-27,-39,-62,-37v-11,-2,-6,-25,4,-25v46,4,74,-19,74,-60v0,-37,-61,-40,-81,-18v-9,11,-16,25,-20,46r-31,177v0,10,-15,8,-27,8v-4,0,-5,-3,-5,-8v17,-74,19,-166,49,-227","w":209},"\u00ae":{"d":"139,-271v56,0,97,40,97,97v0,56,-41,96,-97,96v-56,0,-97,-41,-97,-96v0,-56,40,-97,97,-97xm139,-92v48,0,82,-34,82,-82v0,-48,-34,-83,-82,-83v-49,0,-82,35,-82,83v0,48,33,82,82,82xm105,-237v34,-3,75,-2,75,37v0,17,-8,28,-24,33r28,48v1,7,-8,5,-14,5v-17,-12,-21,-38,-37,-51r-16,0v-4,18,12,54,-14,51v-2,0,-5,-3,-4,-6r0,-109v0,-5,2,-8,6,-8xm117,-180v23,0,46,1,45,-21v0,-21,-22,-20,-45,-20r0,41","w":215},"\u00a9":{"d":"160,-252v70,0,117,47,117,117v0,68,-50,117,-117,117v-67,0,-117,-49,-117,-117v0,-67,48,-117,117,-117xm160,-34v60,0,101,-38,101,-101v0,-59,-43,-102,-101,-102v-58,0,-101,43,-101,102v0,61,40,101,101,101xm192,-192v-53,-10,-66,12,-66,68v0,47,23,50,66,44v7,-1,5,8,5,14v-4,12,-22,7,-39,8v-46,1,-55,-38,-55,-90v0,-55,37,-75,88,-63v8,0,6,8,6,15v0,3,-2,4,-5,4","w":270},"\u00b4":{"d":"137,-279v9,-1,35,-5,30,4v-20,16,-35,37,-58,51v-7,-1,-28,2,-20,-6","w":134},"\u00a8":{"d":"132,-267v1,-10,29,-11,28,0v-5,17,2,42,-27,36v-15,-3,-1,-25,-1,-36xm69,-267v0,-10,30,-11,28,0v-3,17,1,42,-28,36v-14,-4,0,-25,0,-36","w":134},"\u00c6":{"d":"42,-5v-3,7,-30,9,-34,0r108,-235v9,-19,17,-27,42,-28r175,0v6,4,3,27,-5,29r-103,0r-15,86r99,0v9,2,8,28,-5,28r-100,0r-12,77v1,40,73,8,101,25v-2,8,0,20,-7,23v-57,6,-146,9,-125,-65r4,-23r-86,0xm192,-239v-16,2,-42,-7,-48,6r-53,116r79,0","w":309},"\u00d8":{"d":"90,-244v32,-31,109,-37,137,-2v10,-11,25,-33,49,-21v-10,16,-25,27,-36,42v15,34,1,79,-4,114v-13,75,-52,113,-117,113v-26,1,-49,-8,-61,-23v-9,12,-25,32,-48,20r35,-40v-15,-34,-1,-81,4,-116v7,-40,22,-68,41,-87xm205,-221v-15,-28,-75,-22,-94,1v-28,33,-37,89,-39,148xm124,-27v76,-1,86,-94,89,-168r-133,149v8,13,23,19,44,19","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"\u00b1":{"d":"200,-154v12,1,10,26,0,26r-63,0r0,62v1,11,-12,6,-20,7v-4,0,-5,-2,-5,-7r0,-62r-62,0v-11,1,-6,-11,-7,-20v0,-4,2,-6,7,-6r62,0r0,-62v-1,-11,12,-6,20,-7v4,0,5,2,5,7r0,62r63,0xm200,-21v12,0,10,26,0,23r-150,0v-10,1,-6,-9,-7,-17v0,-4,2,-6,7,-6r150,0","w":214},"\u00a5":{"d":"65,-258v-5,-14,15,-9,27,-10v3,0,4,3,5,6r37,122v30,-42,54,-90,87,-128v11,1,37,-4,27,10r-58,85r40,0v7,2,8,25,-5,25r-52,0v-9,16,-24,26,-28,47r72,0v10,3,7,26,-5,25r-72,0r-12,69v0,11,-17,6,-28,7v-4,0,-5,-2,-5,-7r12,-69r-72,0v-10,-3,-7,-26,5,-25r72,0v2,-18,-9,-31,-12,-47r-52,0v-10,-2,-7,-25,4,-25r40,0"},"\u00b5":{"d":"178,-191v0,-9,31,-12,32,0r-31,175v-19,23,-93,24,-121,8r-13,71v0,9,-29,11,-32,2r45,-256v0,-9,30,-12,32,-1r-23,135v-2,40,53,36,82,27","w":200},"\u00aa":{"d":"113,-223v7,-32,-16,-28,-46,-25v-4,-1,-7,-17,3,-17v34,-10,73,-4,65,38r-12,65v-19,19,-90,18,-79,-27v8,-29,31,-35,69,-34xm99,-207v-36,-9,-50,42,-13,39v4,0,11,-1,18,-2r7,-37r-12,0","w":108},"\u00ba":{"d":"122,-165v-33,32,-98,4,-72,-51v4,-32,23,-51,56,-53v57,-3,40,81,16,104xm119,-204v4,-20,7,-45,-17,-45v-25,0,-33,29,-34,57v0,14,7,22,20,22v17,0,27,-12,31,-34","w":115},"\u00e6":{"d":"181,-175v33,-43,139,-32,129,42v-1,15,1,41,-12,44r-120,0v-8,36,-3,68,41,65r64,-5v6,2,7,25,-5,25v-40,8,-100,14,-121,-15v-37,28,-137,37,-130,-38v6,-58,59,-63,125,-61v7,-26,9,-56,-29,-55r-57,2v-11,1,-4,-16,-4,-18v28,-19,106,-20,119,14xm241,-174v-37,2,-53,27,-59,61r96,0v6,-32,-1,-63,-37,-61xm59,-57v-4,45,53,38,78,23r11,-61v-46,0,-85,-3,-89,38","w":307},"\u00f8":{"d":"38,-113v5,-67,83,-112,143,-72v11,-11,21,-33,46,-23v-9,15,-23,26,-34,39v20,76,-11,174,-95,171v-20,0,-37,-5,-48,-15v-10,11,-23,36,-46,23v9,-15,23,-25,34,-39v-13,-22,-2,-59,0,-84xm159,-162v-39,-29,-88,5,-90,49v-1,19,-6,35,-6,56xm102,-25v55,0,66,-62,65,-116r-95,105v7,8,16,11,30,11","w":196},"\u00bf":{"d":"121,-191v0,-12,31,-10,31,0v-5,19,1,48,-32,41v-14,-6,1,-28,1,-41xm117,-128v8,1,23,-4,21,7v1,76,-80,79,-88,145v5,31,52,18,84,16v8,3,5,28,-6,27v-47,9,-113,11,-113,-39v0,-63,60,-78,87,-119v6,-10,0,-36,15,-37","w":160,"k":{"Y":26,"V":22}},"\u00a1":{"d":"83,-157v-2,11,-31,11,-31,0v5,-19,-1,-50,31,-41v14,4,-1,29,0,41xm47,-121v1,-10,30,-11,28,0r-31,187v0,10,-31,12,-32,0","w":78,"k":{"Y":20,"V":9}},"\u00ac":{"d":"65,-168v-10,1,-6,-12,-7,-20v0,-4,2,-6,7,-6r139,0v4,0,7,2,7,6r0,99v0,10,-26,11,-26,0r0,-79r-120,0","w":214},"\u00ab":{"d":"207,-174v9,1,34,-2,22,8r-75,66v16,24,37,45,51,71v-3,8,-24,6,-30,0v-17,-24,-40,-42,-53,-70v0,-5,1,-8,4,-11v28,-21,49,-48,81,-64xm113,-174v9,1,35,-2,23,8r-76,66r52,71v-3,7,-26,7,-31,0v-18,-23,-40,-42,-53,-70v0,-5,2,-8,5,-11v27,-21,48,-48,80,-64","w":220},"\u00bb":{"d":"147,-166v-4,-3,-1,-8,3,-8v10,1,21,-3,26,3v18,23,40,42,53,70v0,5,-2,9,-5,11v-27,21,-49,48,-80,65v-9,-1,-35,2,-23,-8r76,-67xm132,-110v4,4,4,17,-1,20v-28,21,-50,47,-81,65v-9,0,-33,2,-22,-8r75,-67v-16,-24,-37,-44,-51,-70v2,-8,23,-5,30,-1","w":220},"\u00a0":{},"\u00c0":{"d":"218,-8v1,13,-16,6,-27,8v-3,0,-5,-1,-5,-5r-9,-83r-94,0v-14,28,-24,60,-40,86v-7,2,-32,8,-31,-6r108,-235v10,-32,69,-39,73,0xm175,-117r-12,-118v0,-10,-12,-8,-14,0r-54,118r80,0xm189,-292v1,11,-26,5,-27,5r-37,-53v8,-3,31,-6,37,3","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"t":16,"o":4,"f":16,"e":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"Q":9,"O":9,"G":8,"C":8}},"\u00c3":{"d":"236,-322v1,35,-40,48,-64,29v-11,-15,-44,-42,-46,0v0,8,-10,6,-18,6v-7,0,-5,-9,-4,-14v3,-38,41,-51,64,-28v13,13,44,40,46,-1v5,-11,30,-10,22,8xm218,-8v1,13,-16,6,-27,8v-3,0,-5,-1,-5,-5r-9,-83r-94,0v-14,28,-24,60,-40,86v-7,2,-32,8,-31,-6r108,-235v10,-32,69,-39,73,0xm175,-117r-12,-118v0,-10,-12,-8,-14,0r-54,118r80,0","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"t":16,"o":4,"f":16,"e":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"Q":9,"O":9,"G":8,"C":8}},"\u00d5":{"d":"241,-322v1,35,-40,48,-64,29v-12,-15,-44,-42,-46,0v0,8,-10,6,-18,6v-7,0,-5,-9,-4,-14v3,-38,41,-51,64,-28v13,13,44,40,46,-1v5,-10,30,-11,22,8xm90,-244v52,-45,164,-31,157,57v-8,96,-35,189,-128,189v-60,0,-91,-47,-78,-113v10,-51,21,-108,49,-133xm93,-194v-18,52,-49,169,31,167v75,-2,81,-87,90,-160v7,-61,-73,-66,-103,-33v-7,7,-14,15,-18,26","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"\u00f7":{"d":"117,-221v2,-11,32,-11,32,0v-1,20,7,46,-24,39v-13,-3,-7,-25,-8,-39xm203,-154v12,1,10,26,0,26r-139,0v-11,1,-6,-11,-7,-20v0,-4,2,-6,7,-6r139,0xm117,-90v2,-11,32,-11,32,0v-1,20,7,45,-24,38v-15,0,-6,-25,-8,-38","w":214},"\u00ff":{"d":"179,-193v5,-8,40,-10,33,4r-96,207v-18,35,-27,53,-75,53v-19,0,-45,0,-34,-22v13,-15,49,5,65,-10v9,-5,18,-25,23,-39v-20,0,-26,-8,-28,-28r-18,-162v-1,-12,16,-7,26,-8v2,1,5,3,5,6r15,156v0,8,4,9,11,8xm165,-267v1,-10,29,-11,28,0v-5,17,2,42,-27,36v-15,-3,-1,-25,-1,-36xm102,-267v0,-10,30,-11,28,0v-3,17,1,42,-28,36v-14,-4,0,-25,0,-36","w":192,"k":{"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e7":9,"o":8,"e":7,"c":9}},"\u20ac":{"d":"67,-172v18,-79,80,-112,172,-92v11,2,1,16,1,23v0,3,-3,4,-6,4v-78,-12,-118,6,-133,65r102,0v11,-1,5,10,2,16v-1,4,-4,7,-8,7r-102,0r-5,29v31,3,76,-8,98,5v-4,6,-4,17,-13,18r-88,0v-9,69,42,77,111,67v8,3,7,26,-6,28v-77,13,-148,-7,-138,-95v-20,7,-27,-16,-10,-23r13,0r5,-29v-12,1,-22,0,-17,-16v1,-9,13,-7,22,-7"},"\u00c2":{"d":"226,-292v2,3,1,6,-3,6v-32,6,-34,-24,-48,-40v-20,13,-31,49,-68,38v16,-20,32,-40,54,-54v14,2,33,-5,39,5xm218,-8v1,13,-16,6,-27,8v-3,0,-5,-1,-5,-5r-9,-83r-94,0v-14,28,-24,60,-40,86v-7,2,-32,8,-31,-6r108,-235v10,-32,69,-39,73,0xm175,-117r-12,-118v0,-10,-12,-8,-14,0r-54,118r80,0","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"t":16,"o":4,"f":16,"e":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"Q":9,"O":9,"G":8,"C":8}},"\u00ca":{"d":"215,-292v2,11,-16,5,-24,5v-11,-12,-18,-26,-28,-39v-20,13,-31,49,-68,38v18,-18,32,-41,54,-54v14,2,33,-5,39,5xm175,0v-64,5,-153,10,-135,-65v13,-59,16,-131,39,-179v16,-34,108,-26,143,-23v6,4,2,26,-5,27v-48,6,-117,-19,-120,37r-9,50r110,0v8,2,9,28,-5,28r-110,0v-2,38,-39,105,27,98v23,3,57,-6,72,4v-2,7,0,20,-7,23","w":198},"\u00c1":{"d":"218,-8v1,13,-16,6,-27,8v-3,0,-5,-1,-5,-5r-9,-83r-94,0v-14,28,-24,60,-40,86v-7,2,-32,8,-31,-6r108,-235v10,-32,69,-39,73,0xm175,-117r-12,-118v0,-10,-12,-8,-14,0r-54,118r80,0xm197,-341v9,-1,35,-5,30,4v-20,16,-35,37,-58,51v-7,-1,-28,2,-20,-6","w":227,"k":{"\u00fd":19,"\u00dd":31,"\u00d9":9,"\u00db":9,"\u00da":9,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00ff":19,"\u00d5":9,"\u00e6":4,"\u00d8":9,"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":4,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"\u00dc":9,"\u00d6":9,"\u00c7":8,"y":19,"w":14,"v":19,"t":16,"o":4,"f":16,"e":4,"c":4,"a":4,"Y":31,"W":12,"V":25,"U":9,"T":32,"Q":9,"O":9,"G":8,"C":8}},"\u00cb":{"d":"175,0v-64,5,-153,10,-135,-65v13,-59,16,-131,39,-179v16,-34,108,-26,143,-23v6,4,2,26,-5,27v-48,6,-117,-19,-120,37r-9,50r110,0v8,2,9,28,-5,28r-110,0v-2,38,-39,105,27,98v23,3,57,-6,72,4v-2,7,0,20,-7,23xm182,-328v1,-10,29,-11,28,0v-5,17,2,42,-27,36v-15,-3,-1,-25,-1,-36xm119,-328v0,-10,30,-11,28,0v-3,17,1,42,-28,36v-14,-4,0,-25,0,-36","w":198},"\u00c8":{"d":"175,0v-64,5,-153,10,-135,-65v13,-59,16,-131,39,-179v16,-34,108,-26,143,-23v6,4,2,26,-5,27v-48,6,-117,-19,-120,37r-9,50r110,0v8,2,9,28,-5,28r-110,0v-2,38,-39,105,27,98v23,3,57,-6,72,4v-2,7,0,20,-7,23xm180,-291v1,11,-26,5,-27,5r-37,-53v8,-3,31,-6,37,3","w":198},"\u00cd":{"d":"78,-261v2,-13,35,-10,33,0r-45,254v0,10,-32,12,-33,0xm124,-341v9,-1,35,-5,30,4v-20,16,-35,37,-58,51v-7,-1,-28,2,-20,-6","w":96},"\u00ce":{"d":"157,-292v2,3,1,6,-3,6v-32,6,-34,-24,-48,-40v-20,13,-31,49,-68,38v16,-19,31,-41,54,-54v14,2,33,-5,39,5xm78,-261v2,-13,35,-10,33,0r-45,254v0,10,-32,12,-33,0","w":96},"\u00cf":{"d":"78,-261v2,-13,35,-10,33,0r-45,254v0,10,-32,12,-33,0xm122,-327v1,-10,29,-11,28,0v-5,17,2,42,-27,36v-15,-3,-1,-25,-1,-36xm59,-327v0,-10,30,-11,28,0v-3,17,1,42,-28,36v-14,-4,0,-25,0,-36","w":96},"\u00cc":{"d":"78,-261v2,-13,35,-10,33,0r-45,254v0,10,-32,12,-33,0xm121,-292v1,11,-26,5,-27,5r-37,-53v8,-3,31,-6,37,3","w":96},"\u00d3":{"d":"90,-244v52,-45,164,-31,157,57v-8,96,-35,189,-128,189v-60,0,-91,-47,-78,-113v10,-51,21,-108,49,-133xm93,-194v-18,52,-49,169,31,167v75,-2,81,-87,90,-160v7,-61,-73,-66,-103,-33v-7,7,-14,15,-18,26xm193,-341v9,-1,35,-5,30,4v-20,16,-35,37,-58,51v-7,-1,-28,2,-20,-6","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"\u00d4":{"d":"229,-292v2,2,1,6,-2,6v-32,6,-34,-25,-49,-41v-20,14,-31,50,-68,39v14,-20,34,-36,50,-54v15,2,37,-6,43,5xm90,-244v52,-45,164,-31,157,57v-8,96,-35,189,-128,189v-60,0,-91,-47,-78,-113v10,-51,21,-108,49,-133xm93,-194v-18,52,-49,169,31,167v75,-2,81,-87,90,-160v7,-61,-73,-66,-103,-33v-7,7,-14,15,-18,26","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"\u00d2":{"d":"90,-244v52,-45,164,-31,157,57v-8,96,-35,189,-128,189v-60,0,-91,-47,-78,-113v10,-51,21,-108,49,-133xm93,-194v-18,52,-49,169,31,167v75,-2,81,-87,90,-160v7,-61,-73,-66,-103,-33v-7,7,-14,15,-18,26xm193,-292v1,11,-26,5,-27,5r-37,-53v8,-3,31,-6,37,3","w":238,"k":{"\u00dd":14,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"Z":13,"Y":14,"X":16,"W":4,"V":8,"T":16,"A":9}},"\u00da":{"d":"224,-261v3,-10,34,-12,33,0v-29,105,-1,263,-138,263v-58,0,-87,-38,-75,-99r29,-164v1,-9,32,-12,33,0r-29,164v-8,43,5,73,47,72v47,-2,63,-29,71,-72xm199,-341v9,-1,35,-5,30,4v-20,16,-35,37,-58,51v-7,-1,-28,2,-20,-6","w":238,"k":{"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"A":9}},"\u00db":{"d":"227,-292v2,3,1,6,-3,6v-32,6,-34,-24,-48,-40v-20,13,-31,49,-68,38v16,-20,32,-40,54,-54v14,2,33,-5,39,5xm224,-261v3,-10,34,-12,33,0v-29,105,-1,263,-138,263v-58,0,-87,-38,-75,-99r29,-164v1,-9,32,-12,33,0r-29,164v-8,43,5,73,47,72v47,-2,63,-29,71,-72","w":238,"k":{"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"A":9}},"\u00d9":{"d":"224,-261v3,-10,34,-12,33,0v-29,105,-1,263,-138,263v-58,0,-87,-38,-75,-99r29,-164v1,-9,32,-12,33,0r-29,164v-8,43,5,73,47,72v47,-2,63,-29,71,-72xm191,-292v1,11,-26,5,-27,5r-37,-53v8,-3,31,-6,37,3","w":238,"k":{"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c0":9,"\u00c5":9,"\u00c4":9,"A":9}},"\u00b8":{"d":"62,12v8,1,31,-4,25,5v-20,16,-35,37,-58,51v-7,-1,-27,4,-20,-6v18,-16,31,-39,53,-50","w":131},"\u00a6":{"d":"52,-255v2,-12,33,-10,32,0r0,125v0,10,-15,6,-25,7v-4,1,-7,-4,-7,-7r0,-125xm52,-56v2,-12,33,-10,32,0r0,125v0,11,-15,6,-25,7v-4,0,-7,-3,-7,-7r0,-125","w":89},"\u00d0":{"d":"82,-266v90,-15,174,3,156,108v-15,87,-40,162,-138,160v-29,0,-50,-1,-64,-3v-5,-1,-9,-5,-6,-9r20,-115v-8,-1,-20,4,-20,-7v0,-16,6,-24,25,-21r18,-104v1,-5,4,-8,9,-9xm125,-153v12,2,4,28,-5,28r-37,0r-17,99v71,8,125,-16,131,-84v2,-24,10,-47,10,-74v0,-57,-50,-62,-104,-57r-15,88r37,0","w":230},"\u00f0":{"d":"152,-250v86,46,61,252,-54,252v-102,0,-71,-166,-10,-190v24,-10,68,-15,84,5v-6,-24,-22,-41,-45,-51v-15,7,-38,39,-50,15v6,-10,22,-16,31,-24v-19,-5,-45,-12,-21,-30v17,4,35,10,46,14v16,-7,30,-28,48,-26v15,17,-20,24,-29,35xm69,-107v-8,37,-13,84,34,82v52,-2,60,-55,65,-106v5,-46,-57,-48,-79,-22v-9,11,-16,27,-20,46","w":196},"\u00dd":{"d":"59,-261v1,-12,31,-9,33,-1r29,116v4,14,10,12,16,0r71,-116v3,-9,30,-10,36,-1v-24,45,-54,86,-80,130v-8,13,-16,20,-24,23r-18,103v0,11,-16,6,-27,7v-3,0,-5,-3,-5,-7r18,-103v-7,-3,-12,-10,-16,-23xm186,-341v9,-1,35,-5,30,4v-20,16,-35,37,-58,51v-7,-1,-28,2,-20,-6","w":209,"k":{"\u00fd":20,"\u00d2":14,"\u00d4":14,"\u00d3":14,"\u00c8":10,"\u00cb":10,"\u00c1":31,"\u00ca":10,"\u00c2":31,"\u00ff":20,"\u00d5":14,"\u00c3":31,"\u00c0":31,"\u00e6":31,"\u00d8":14,"\u00c6":31,"\u00fc":26,"\u00fb":26,"\u00f9":26,"\u00fa":26,"\u00f5":35,"\u00f6":35,"\u00f4":35,"\u00f2":35,"\u00f3":35,"\u00eb":34,"\u00ea":34,"\u00e8":34,"\u00e9":34,"\u00e5":31,"\u00e3":31,"\u00e4":31,"\u00e2":31,"\u00e0":31,"\u00e1":31,"\u00d6":14,"\u00c9":10,"\u00c7":16,"\u00c5":31,"\u00c4":31,"y":20,"v":21,"u":26,"o":35,"e":34,"a":31,"Q":14,"O":14,"E":10,"C":16,"A":31}},"\u00fd":{"d":"179,-193v5,-8,40,-10,33,4r-96,207v-18,35,-27,53,-75,53v-19,0,-45,0,-34,-22v13,-15,49,5,65,-10v9,-5,18,-25,23,-39v-20,0,-26,-8,-28,-28r-18,-162v-1,-12,16,-7,26,-8v2,1,5,3,5,6r15,156v0,8,4,9,11,8xm174,-279v9,-1,35,-5,30,4v-20,16,-35,37,-58,51v-7,-1,-28,2,-20,-6","w":192,"k":{"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e7":9,"o":8,"e":7,"c":9}},"\u00de":{"d":"101,-236v69,-7,138,6,123,83v-13,67,-70,88,-151,80r-12,66v0,10,-32,12,-33,0r45,-254v1,-9,32,-13,33,0xm191,-153v14,-55,-37,-59,-94,-55r-19,107v62,6,101,-5,113,-52","w":213},"\u00fe":{"d":"91,-197v79,-22,129,30,101,111v-7,67,-57,100,-135,85r-12,65v-1,8,-30,11,-32,0r61,-333v7,-2,31,-7,29,6xm150,-52v17,-45,40,-142,-45,-121v-8,1,-14,2,-19,3r-25,142v36,8,78,6,89,-24","w":194},"\u00d7":{"d":"202,-93v6,9,-10,26,-19,18r-47,-47v-18,16,-32,36,-53,50v-7,-4,-21,-13,-13,-22r47,-47v-16,-18,-36,-32,-50,-53v5,-6,12,-19,22,-13r47,48v18,-17,32,-37,53,-51v7,4,19,12,13,22r-48,47","w":214},"\u00b9":{"d":"101,-268v6,1,16,-3,14,4r-24,140v0,6,-22,7,-23,0r21,-121v-10,2,-23,15,-32,10v2,-6,0,-15,6,-18v12,-5,25,-12,38,-15","w":101},"\u00b2":{"d":"65,-262v24,-15,85,-13,84,22v-3,56,-77,47,-85,99v21,3,52,-6,66,4v-2,6,1,16,-7,17r-81,0v-14,-52,46,-80,79,-103v11,-14,2,-30,-22,-27v-15,2,-45,10,-34,-12","w":122},"\u00b3":{"d":"38,-128v-3,-20,19,-13,35,-13v26,1,39,-6,40,-31v2,-29,-43,-8,-58,-21v-3,-34,69,6,69,-43v0,-26,-49,-3,-64,-15v-3,-19,23,-17,40,-19v53,-6,61,54,23,72v45,56,-39,96,-85,70","w":121},"\u00bd":{"d":"191,-140v26,-14,85,-14,84,22v-2,56,-77,46,-84,97v21,3,52,-6,66,4v-2,7,1,17,-8,17r-81,0v-12,-53,47,-77,80,-101v14,-21,-8,-32,-38,-27v-11,2,-26,5,-19,-12xm89,-245v-10,3,-23,15,-32,10v2,-6,0,-16,6,-18v14,-4,36,-24,52,-11r-24,140v0,6,-22,7,-23,0xm233,-266v7,-4,32,-5,23,5r-201,261v-6,2,-31,4,-23,-6","w":271},"\u00bc":{"d":"240,-37v-5,16,3,43,-25,37v-8,-7,2,-26,2,-37v-19,-2,-47,5,-59,-4v1,-8,4,-21,7,-25r73,-81v7,2,20,-4,21,4r-15,87v6,1,18,-3,18,4v1,12,-6,17,-22,15xm101,-268v6,1,16,-3,14,4r-24,140v0,6,-22,7,-23,0r21,-121v-10,2,-23,15,-32,10v2,-6,0,-15,6,-18v12,-5,25,-12,38,-15xm233,-266v7,-4,32,-5,23,5r-201,261v-6,2,-31,4,-23,-6xm221,-56r9,-55v-18,16,-31,36,-48,53v9,5,27,1,39,2","w":268},"\u00be":{"d":"269,-37v-6,16,2,43,-25,37v-10,-6,2,-26,2,-37v-19,-3,-47,6,-59,-4v2,-8,3,-19,6,-25r74,-81v7,1,20,-4,21,4r-15,87v6,1,18,-3,18,4v1,12,-6,17,-22,15xm262,-266v7,-4,31,-6,22,5r-200,261v-6,1,-31,4,-23,-6r195,-255v3,-3,5,-4,6,-5xm38,-128v-3,-20,19,-13,35,-13v26,1,39,-6,40,-31v2,-29,-43,-8,-58,-21v-3,-34,69,6,69,-43v0,-26,-49,-3,-64,-15v-3,-19,23,-17,40,-19v53,-6,61,54,23,72v45,56,-39,96,-85,70xm250,-56v2,-18,9,-38,8,-55r-47,53v9,5,27,1,39,2","w":297},"\u00ad":{"d":"40,-92v-11,-3,-4,-27,5,-27r72,0v8,2,7,27,-5,27r-72,0","w":119},"\u00af":{"d":"224,-305v9,-1,5,9,4,14v-1,4,-3,6,-8,6r-185,0v-9,0,-7,-9,-5,-15v1,-4,3,-5,8,-5r186,0","w":177},"\u00b7":{"d":"45,-123v5,-20,-2,-50,31,-42v14,4,0,29,0,41v0,10,-16,7,-26,7v-4,0,-5,-2,-5,-6","w":76},"\u00a4":{"d":"200,-220v10,-5,23,9,18,19r-30,29v16,21,16,55,0,76v14,15,48,37,16,51v-14,-9,-23,-23,-35,-33v-22,16,-53,16,-74,0v-15,13,-38,48,-51,16v8,-13,22,-22,32,-34v-15,-21,-17,-54,-1,-75v-13,-14,-47,-37,-16,-51v14,7,23,22,35,32v22,-16,54,-16,76,0xm131,-91v25,-1,44,-18,44,-43v0,-25,-19,-42,-44,-43v-24,-1,-43,20,-43,43v-1,22,21,44,43,43"}}});
/*!
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * Digitized data (C) 2004 Agfa Monotype Corporation. Neo Sans(TM) is a trademark
 * of Agfa Monotype Corporation and may be registered in certain jurisdictions. 
 * All rights reserved. Neo Sans is designed by Sebastian Lester.
 * 
 * Trademark:
 * Neo Sans(TM) is a trademark of Agfa Monotype Corporation and may be registered
 * in certain jurisdictions.
 * 
 * Manufacturer:
 * Agfa Monotype Corporation
 * 
 * Designer:
 * Sebastian Lester
 * 
 * Vendor URL:
 * http://www.agfamonotype.com
 * 
 * License information:
 * http://www.agfamonotype.com/html/type/license.html
 */
Cufon.registerFont({"w":232,"face":{"font-family":"Neo Sans","font-weight":700,"font-style":"italic","font-stretch":"normal","units-per-em":"360","panose-1":"2 11 8 4 2 2 2 9 2 4","ascent":"288","descent":"-72","x-height":"3","bbox":"-23 -364.036 360 79.7958","underline-thickness":"17.9297","underline-position":"-27.0703","slope":"-10","unicode-range":"U+0020-U+20AC"},"glyphs":{" ":{"w":90},"!":{"d":"76,-276v16,3,46,-8,51,7r-39,180v-2,10,-42,12,-46,0r25,-180v0,-4,5,-7,9,-7xm30,-53v7,-12,35,-3,51,-6v4,0,6,1,6,6v-6,17,1,47,-17,53v-16,-3,-44,7,-48,-7","w":98},"\"":{"d":"206,-276v5,0,5,5,2,7r-44,84v-12,2,-33,3,-44,-1r35,-83v6,-15,34,-4,51,-7xm127,-276v4,0,5,4,3,7r-41,79v-7,12,-34,6,-48,4r35,-83v6,-15,34,-4,51,-7","w":169,"k":{".":27,",":27}},"#":{"d":"232,-199v12,2,35,-6,37,6v-6,10,-5,27,-16,31r-30,0r-16,58v12,2,34,-6,36,6v-6,10,-4,27,-16,31r-30,0r-16,60v-4,14,-29,4,-44,7v-4,0,-7,-4,-4,-7r15,-60r-40,0r-17,60v-4,14,-29,4,-44,7v-4,0,-6,-2,-5,-7r16,-60v-11,-3,-33,6,-35,-6v5,-10,4,-27,15,-31r30,0r15,-58v-10,-2,-35,5,-34,-5v5,-11,4,-28,15,-32r29,0v7,-22,11,-47,20,-67v10,-5,28,-1,42,-2v3,0,4,3,4,7r-17,62r41,0r17,-62v4,-14,30,-4,45,-7v4,0,4,3,4,7xm173,-162r-40,0r-16,58r41,0","w":251},"$":{"d":"185,-270v27,5,49,-1,57,14v-6,13,0,38,-15,42v-37,1,-121,-22,-103,30v40,32,118,52,89,131v-11,30,-38,50,-76,53v-5,13,0,37,-14,41v-15,-3,-43,8,-46,-7r6,-32v-17,-1,-32,-3,-45,-7v-12,-8,1,-35,4,-47v34,-6,129,24,106,-39v-29,-31,-89,-42,-91,-98v-1,-48,29,-74,73,-79v5,-13,0,-36,15,-39v14,3,42,-8,45,7"},"%":{"d":"219,-134v32,-29,98,-11,85,48v-10,46,-16,89,-69,89v-68,0,-44,-112,-16,-137xm295,-268v5,1,3,6,0,8r-199,258v-10,3,-35,4,-44,-1v0,-2,0,-4,1,-5r200,-258v10,-5,29,-1,42,-2xm72,-257v32,-29,98,-11,85,48v-10,46,-17,89,-69,89v-67,0,-43,-112,-16,-137xm256,-116v-28,2,-41,78,-16,88v27,-4,29,-43,29,-72v0,-11,-4,-16,-13,-16xm93,-151v27,-2,42,-80,16,-89v-28,3,-23,45,-29,72v0,11,4,17,13,17","w":301},"&":{"d":"216,-129v2,-14,28,-5,41,-7v6,0,5,5,5,10v-4,33,-17,56,-35,79v10,14,23,25,31,42v-14,10,-65,10,-71,-9v-53,30,-159,25,-157,-49v1,-45,29,-57,61,-77v-13,-17,-24,-34,-24,-58v0,-55,41,-69,96,-73v71,-6,94,76,45,112v-11,8,-30,19,-45,28r38,50v8,-12,12,-30,15,-48xm157,-230v-41,0,-46,44,-21,65v21,-13,46,-19,46,-48v0,-13,-10,-17,-25,-17xm89,-63v-2,34,52,28,73,16r-45,-58v-18,11,-27,18,-28,42","w":263},"'":{"d":"127,-276v4,0,5,4,3,7r-41,79v-7,12,-34,6,-48,4r35,-83v6,-15,34,-4,51,-7","w":91,"k":{".":27,",":27}},"(":{"d":"166,-265v-55,77,-103,210,-61,330v-5,10,-40,7,-49,0v-55,-106,-9,-266,54,-327v9,-9,42,-8,56,-3","w":129,"k":{"j":-13}},")":{"d":"-2,67v57,-76,103,-209,62,-329v4,-11,41,-9,49,0v54,106,10,268,-54,327v-10,8,-43,7,-57,2","w":129},"*":{"d":"180,-233v12,-3,22,30,11,33r-42,12v7,15,28,28,26,45v-9,4,-20,23,-28,11r-25,-36v-11,12,-16,37,-33,39v-6,-7,-28,-11,-20,-23r26,-36v-14,-7,-43,-6,-46,-19v5,-9,2,-31,16,-26r41,14v2,-16,-8,-45,5,-51v11,2,29,-6,29,8r-1,43","w":172},"+":{"d":"227,-163v13,2,5,25,7,38v0,4,-2,6,-7,6r-61,0r0,61v-1,14,-26,4,-38,7v-14,-10,-2,-47,-6,-68r-61,0v-14,-1,-4,-26,-7,-38v10,-14,47,-2,68,-6r0,-61v2,-13,25,-5,38,-7v4,0,6,2,6,7r0,61r61,0"},",":{"d":"88,-59v5,0,6,3,4,6r-53,87v-10,3,-24,0,-36,1v-6,1,-5,-4,-4,-7r37,-81v8,-14,35,-3,52,-6","w":98,"k":{"*":27,"'":27,"\"":27}},"-":{"d":"29,-95v4,-13,0,-32,13,-35r70,0v13,3,1,24,1,34v0,4,-4,6,-8,6r-70,0v-4,0,-6,-1,-6,-5","w":108},".":{"d":"30,-53v7,-12,34,-4,51,-6v4,0,6,1,6,6v-6,17,1,47,-17,53r-42,0v-4,0,-6,-2,-6,-7","w":98,"k":{"*":27,"'":27,"\"":27}},"\/":{"d":"12,0v-6,1,-7,-4,-5,-8r120,-252v6,-16,35,-5,54,-8v6,0,7,4,5,8r-120,252v-6,16,-35,5,-54,8","w":145,"k":{"q":12,"o":12,"e":18,"c":20,"4":16,"\/":5}},"0":{"d":"88,-245v50,-50,166,-29,156,60v-11,95,-23,188,-127,188v-120,0,-81,-197,-29,-248xm108,-149v-5,35,-27,101,18,101v54,0,49,-85,57,-137v6,-40,-39,-43,-56,-19v-7,11,-15,29,-19,55"},"1":{"d":"97,0v-4,0,-7,-2,-6,-7r35,-199r-48,18v-6,-12,1,-40,8,-51v33,-11,56,-33,105,-29v4,0,6,2,6,7r-45,254v-6,14,-37,4,-55,7"},"2":{"d":"85,-260v56,-17,160,-25,160,45v0,101,-126,87,-151,164r112,0v14,5,-1,31,0,44v0,4,-5,7,-9,7r-160,0v-14,-7,1,-30,1,-44v0,-83,95,-103,143,-148v9,-20,-4,-30,-31,-30v-27,0,-43,2,-73,5v-10,-7,-4,-39,8,-43"},"3":{"d":"86,-260v63,-19,158,-22,158,50v0,35,-17,63,-44,73v12,7,24,27,24,45v0,93,-101,110,-183,85v-13,-5,0,-24,-1,-36v1,-4,4,-6,9,-6v52,3,119,17,114,-46v-3,-33,-58,-13,-88,-19v-14,-3,0,-26,0,-38v-1,-4,5,-6,8,-6v48,0,105,9,99,-45v-1,-16,-12,-20,-31,-19r-73,5v-10,-7,-4,-39,8,-43"},"4":{"d":"177,-262v11,-9,51,-12,55,2r-27,152v10,2,30,-6,29,8v-4,14,1,37,-14,40r-24,0r-9,53v-6,14,-38,4,-56,7v-4,0,-5,-3,-5,-7r9,-53r-104,0v-13,-9,-1,-41,6,-53xm145,-108v3,-25,12,-55,12,-77r-69,76v16,3,39,0,57,1"},"5":{"d":"237,-268v14,6,-1,30,0,43v0,4,-5,7,-9,7r-98,0r-13,50v58,-1,102,11,105,66v5,100,-96,122,-184,95v-14,-4,-1,-24,-1,-37v14,-14,50,-1,73,-2v36,-2,49,-15,49,-51v-1,-39,-63,-19,-101,-24v-3,0,-4,-2,-4,-5r38,-139v2,-1,3,-3,5,-3r140,0"},"6":{"d":"39,-75v0,-90,18,-196,132,-196v28,0,52,2,70,8v14,5,0,26,1,39v-12,17,-46,2,-74,2v-39,0,-51,18,-55,55v57,-12,121,1,119,62v-2,70,-42,108,-113,108v-51,0,-80,-29,-80,-78xm127,-44v32,0,44,-23,44,-56v0,-34,-33,-29,-66,-25v-4,28,-19,81,22,81"},"7":{"d":"243,-268v21,6,4,44,-4,55r-131,206v-10,15,-40,4,-61,7v-6,0,-6,-5,-3,-8r135,-208v-28,-6,-69,0,-101,-2v-14,-6,0,-37,3,-48v49,-6,109,0,162,-2","k":{"\/":40,".":43,",":43}},"8":{"d":"162,-271v88,-8,116,100,46,132v14,12,21,28,21,47v0,68,-46,95,-115,95v-46,0,-82,-24,-82,-67v0,-32,14,-56,42,-75v-13,-12,-20,-26,-20,-45v1,-63,45,-81,108,-87xm139,-160v47,13,77,-65,19,-66v-30,-1,-47,14,-47,43v0,16,11,23,28,23xm122,-42v30,0,48,-20,48,-48v-1,-21,-15,-29,-39,-27v-39,-4,-63,75,-9,75"},"9":{"d":"161,-271v126,-2,76,197,28,251v-27,29,-106,28,-150,16v-14,-4,0,-27,-1,-39v1,-6,4,-9,10,-8v52,9,123,14,119,-50v-59,12,-120,-1,-119,-61v1,-71,43,-108,113,-109xm109,-167v0,34,34,30,66,24v5,-30,18,-81,-22,-81v-31,0,-45,26,-44,57"},":":{"d":"46,-144v6,-18,0,-47,17,-53r42,0v5,0,6,2,6,7v-6,17,-1,45,-16,52v-16,-3,-44,7,-49,-6xm30,-53v7,-12,34,-4,51,-6v4,0,6,1,6,6v-6,17,1,47,-17,53r-42,0v-4,0,-6,-2,-6,-7","w":98},";":{"d":"46,-144v6,-18,0,-47,17,-53r42,0v4,0,6,2,6,7v-6,17,-1,45,-16,52v-16,-3,-44,7,-49,-6xm83,-59v4,0,5,4,3,7r-48,81v-6,13,-25,5,-40,7v-5,0,-7,-3,-5,-7r37,-81v7,-15,35,-4,53,-7","w":98},"<":{"d":"210,-58v3,2,2,10,-3,9v-19,-2,-46,6,-58,-4r-84,-75v-10,-7,-9,-19,0,-26v31,-25,58,-56,92,-78r50,0v5,0,6,6,3,9r-94,82"},"=":{"d":"223,-203v-3,13,7,38,-7,38r-151,0v-14,-1,-4,-26,-7,-38v0,-4,2,-6,7,-6r151,0v5,0,7,2,7,6xm216,-117v13,2,5,26,7,39v0,4,-2,5,-7,5r-151,0v-15,-1,-4,-26,-7,-38v0,-4,3,-6,7,-6r151,0"},">":{"d":"73,-223v-5,-3,-3,-8,2,-9v20,2,47,-7,59,4r83,74v10,9,11,17,0,26v-31,26,-57,57,-92,79v-18,-2,-46,6,-55,-5v30,-31,65,-58,96,-87"},"?":{"d":"60,-264v53,-25,161,-10,129,65v-17,41,-59,63,-81,100v3,24,-27,16,-47,17v-14,-5,1,-32,3,-42v12,-32,61,-49,61,-88v0,-9,-4,-10,-15,-10v-21,0,-31,2,-53,4v-12,-8,1,-33,3,-46xm38,-6v6,-18,2,-45,17,-53r43,0v4,0,6,2,6,7r-9,45v-4,14,-34,4,-50,7v-4,0,-7,-2,-7,-6","w":172},"@":{"d":"58,-188v51,-72,228,-70,223,46v-4,89,-55,125,-146,125v-36,0,-63,-21,-56,-58v11,-55,18,-108,85,-102v16,2,54,-5,55,17r-21,107v37,-5,51,-47,54,-89v5,-78,-107,-85,-154,-48v-36,29,-48,91,-52,147v-5,64,76,64,138,57v6,3,3,21,-4,23v-91,13,-179,-10,-160,-103v9,-44,16,-91,38,-122xm127,-115v-5,30,-25,75,29,64r18,-90v-27,-5,-43,0,-47,26","w":278},"A":{"d":"179,0v-4,0,-7,-3,-7,-7r-2,-59r-74,0r-23,59v-8,15,-40,4,-60,7v-5,1,-6,-4,-4,-8r93,-223v11,-40,65,-49,103,-32v9,4,15,16,16,32r14,224v-6,15,-38,4,-56,7xm168,-115r-4,-99v0,-8,-8,-8,-9,0r-40,99r53,0","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"L":7,"G":7,"E":5,"C":7}},"B":{"d":"91,-267v68,-9,167,-11,167,58v-1,35,-16,62,-42,73v15,7,24,24,24,44v1,71,-59,95,-129,95v-30,0,-88,10,-81,-27r38,-219v3,-16,8,-22,23,-24xm198,-199v-1,-28,-43,-19,-73,-21r-11,62v42,1,85,4,84,-41xm94,-47v45,1,86,2,86,-43v0,-32,-42,-24,-74,-25","w":240,"k":{"\u00dd":14,"\u00c6":7,"Y":14,"X":8,"V":8,"T":5,"A":4}},"C":{"d":"94,-249v28,-21,111,-34,139,-8v-6,13,0,39,-16,42v-59,-8,-99,0,-108,58v-7,44,-27,123,46,106v12,2,41,-9,40,5v-5,15,0,38,-15,43v-77,22,-162,-13,-142,-108v11,-54,21,-111,56,-138","w":201,"k":{"\u00fd":3,"\u00d2":8,"\u00d4":8,"\u00d3":8,"\u00ff":3,"\u00d5":8,"\u00d8":8,"\u00d6":8,"\u00c7":10,"y":3,"Q":8,"O":8,"G":6}},"D":{"d":"74,-262v88,-25,202,-7,181,105v-17,91,-36,160,-143,160v-30,0,-55,-1,-76,-5v-8,-1,-11,-7,-8,-13r42,-238v1,-4,2,-7,4,-9xm185,-111v6,-44,26,-113,-34,-107r-26,0r-30,168v54,6,83,-10,90,-61","w":245,"k":{"\u00c1":6,"\u00c2":6,"\u00c3":6,"\u00c0":6,"\u00c6":6,"\u00c5":6,"\u00c4":6,"Z":3,"Y":17,"X":12,"W":2,"V":6,"T":5,"A":6}},"E":{"d":"72,-235v18,-42,120,-45,163,-25v-7,12,0,39,-15,42v-36,7,-95,-17,-100,24r-6,33r93,0v14,5,-1,29,0,41v0,5,-5,8,-9,8r-93,0v0,22,-23,62,12,62r73,0v14,5,-1,29,0,41v-1,4,-3,7,-8,8v-69,10,-163,9,-145,-73v12,-52,17,-118,35,-161","w":209},"F":{"d":"78,0v-17,-3,-47,8,-53,-7v16,-74,20,-163,47,-227v19,-45,100,-41,156,-32v16,3,-1,27,0,41v0,4,-5,7,-8,7v-37,5,-97,-18,-100,25r-6,32r93,0v14,5,-1,29,0,41v0,5,-5,8,-9,8r-93,0r-18,105v0,4,-5,7,-9,7","w":209,"k":{"\u00c1":21,"\u00c2":21,"\u00c3":21,"\u00c0":21,"\u00e6":13,"\u00c6":21,"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"\u00e5":13,"\u00e3":13,"\u00e4":13,"\u00e2":13,"\u00e0":13,"\u00e1":13,"\u00c5":21,"\u00c4":21,"u":9,"o":13,"e":11,"a":13,"O":4,"G":8,"A":21,".":38,",":38}},"G":{"d":"64,-215v25,-55,122,-71,190,-42v-5,14,0,38,-14,43v-36,0,-111,-16,-120,21v-13,25,-19,72,-23,106v-4,36,27,40,60,36r15,-83v6,-14,37,-4,54,-7v4,1,6,3,6,7r-21,121v-15,21,-54,13,-91,16v-108,8,-89,-146,-56,-218","k":{"Y":9,"V":2}},"H":{"d":"277,-268v4,0,7,2,6,7r-44,254v-6,14,-38,4,-56,7v-4,-1,-6,-3,-6,-7r18,-104r-89,0r-18,104v-6,14,-38,4,-56,7v-4,0,-5,-3,-5,-7r44,-254v6,-14,38,-4,56,-7v4,1,6,3,6,7r-17,96r89,0r17,-96v6,-14,37,-4,55,-7","w":262},"I":{"d":"88,-7v-6,14,-38,4,-56,7v-4,0,-5,-2,-5,-7r44,-254v7,-15,38,-3,56,-7v4,0,6,2,6,7","w":111},"J":{"d":"80,-268v17,3,47,-8,53,7r-47,263v-6,50,-44,68,-98,61v-7,-12,-5,-58,25,-48v10,0,10,-4,12,-13r46,-263v0,-4,5,-7,9,-7","w":111},"K":{"d":"80,-268v17,3,47,-8,53,7r-20,109r95,-111v14,-11,46,-2,68,-5v8,1,7,4,3,10r-112,121r65,133v-12,10,-44,1,-64,4v-3,0,-7,-2,-8,-5r-51,-119r-21,117v-6,14,-38,4,-56,7v-4,0,-5,-3,-5,-7r44,-254v0,-4,5,-7,9,-7","w":244,"k":{"\u00fd":19,"\u00dd":4,"\u00d9":2,"\u00db":2,"\u00da":2,"\u00d2":19,"\u00d4":19,"\u00d3":19,"\u00c8":15,"\u00cb":15,"\u00ca":15,"\u00ff":19,"\u00d5":19,"\u00e6":10,"\u00d8":19,"\u00fc":17,"\u00fb":17,"\u00f9":17,"\u00fa":17,"\u00f5":14,"\u00f6":14,"\u00f4":14,"\u00f2":14,"\u00f3":14,"\u00eb":18,"\u00ea":18,"\u00e8":18,"\u00e9":18,"\u00e5":10,"\u00e3":10,"\u00e4":10,"\u00e2":10,"\u00e0":10,"\u00e1":10,"\u00dc":2,"\u00d6":19,"\u00c9":15,"\u00c7":8,"y":19,"w":18,"v":19,"u":17,"q":9,"o":14,"g":6,"e":18,"d":12,"c":12,"a":10,"Y":4,"W":4,"V":2,"U":2,"T":2,"Q":19,"O":19,"L":5,"G":22,"E":15,"C":22,"-":6}},"L":{"d":"100,-74v-11,39,49,18,80,24v16,3,0,28,0,41v-9,17,-39,11,-68,12v-49,2,-83,-24,-74,-77r33,-186v6,-15,37,-5,56,-8v4,1,6,3,6,8","w":186,"k":{"\u00fd":23,"\u00dd":35,"\u00d9":12,"\u00db":12,"\u00da":12,"\u00d2":11,"\u00d4":11,"\u00d3":11,"\u00c8":6,"\u00cb":6,"\u00ca":6,"\u00ff":23,"\u00d5":11,"\u00d8":11,"\u00ae":9,"\u00eb":3,"\u00ea":3,"\u00e8":3,"\u00e9":3,"\u00dc":12,"\u00d6":11,"\u00c9":6,"y":23,"w":8,"v":8,"o":4,"e":3,"Y":35,"W":11,"V":23,"U":12,"T":30,"S":2,"Q":11,"O":11,"L":8,"G":10,"E":6,"C":5,"-":6}},"M":{"d":"266,-268v18,3,52,-8,48,13r-45,250v-8,11,-37,2,-54,5v-3,0,-4,-3,-4,-7r26,-151v-1,-2,-4,-3,-5,0r-43,60v-7,9,-40,10,-50,0v-9,-20,-13,-45,-25,-62v-13,47,-15,104,-28,153v-4,15,-37,4,-55,7v-4,0,-5,-1,-5,-5r44,-250v3,-18,54,-21,61,-3r40,108v28,-33,52,-73,78,-108v5,-7,10,-10,17,-10","w":293,"k":{"\u00dd":10,"Y":10,"V":6}},"N":{"d":"226,-261v8,-12,54,-12,57,0r-43,247v-3,21,-58,21,-66,3r-63,-145v-13,46,-16,101,-28,149v-4,14,-34,4,-51,7v-4,0,-5,-3,-5,-7r43,-247v3,-21,56,-21,63,-2r64,151v16,-46,17,-106,29,-156","w":262,"k":{"\u00dd":15,"Y":15,"V":8,"T":9}},"O":{"d":"64,-210v34,-79,206,-87,198,27v-8,99,-28,186,-137,186v-111,0,-93,-139,-61,-213xm109,-155v-7,39,-28,107,26,104v58,-3,58,-73,65,-128v6,-49,-66,-47,-80,-12v-4,10,-8,21,-11,36","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c6":5,"\u00c5":7,"\u00c4":7,"x":5,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"P":{"d":"75,-261v73,-21,195,-20,180,80v-11,71,-70,93,-152,86r-15,88v-7,14,-38,4,-56,7v-4,0,-6,-2,-6,-7r43,-242v1,-6,3,-10,6,-12xm112,-145v39,4,82,-1,82,-46v0,-33,-38,-30,-69,-27","w":234,"k":{"\u00c1":20,"\u00c2":20,"\u00c3":20,"\u00c0":20,"\u00e6":8,"\u00c6":15,"\u00f5":2,"\u00f6":2,"\u00f4":2,"\u00f2":2,"\u00f3":2,"\u00eb":2,"\u00ea":2,"\u00e8":2,"\u00e9":2,"\u00e5":8,"\u00e3":8,"\u00e4":8,"\u00e2":8,"\u00e0":8,"\u00e1":8,"\u00c5":20,"\u00c4":20,"o":2,"e":2,"a":8,"Z":9,"Y":6,"X":13,"T":4,"A":20,".":40,",":38}},"Q":{"d":"64,-210v34,-80,206,-87,198,27v-7,90,-24,171,-108,184v-10,29,35,6,47,21v-5,14,0,34,-15,38v-49,15,-109,-2,-89,-60v-84,-14,-60,-148,-33,-210xm109,-155v-7,39,-28,107,26,104v58,-3,58,-73,65,-128v6,-49,-66,-47,-80,-12v-4,10,-8,21,-11,36","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c6":5,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"R":{"d":"75,-261v65,-18,184,-22,182,59v-1,48,-22,80,-61,92r37,105v-10,11,-44,4,-61,4v-15,-29,-23,-65,-36,-97r-32,-1r-16,92v-6,14,-38,4,-56,7v-4,0,-5,-3,-5,-7r42,-242v1,-6,3,-10,6,-12xm113,-148v46,2,82,-1,82,-46v0,-30,-42,-24,-70,-23","w":244,"k":{"\u00fd":7,"\u00dd":14,"\u00d2":10,"\u00d4":10,"\u00d3":10,"\u00c8":8,"\u00cb":8,"\u00ca":8,"\u00ff":7,"\u00d5":10,"\u00d8":10,"\u00f5":11,"\u00f6":11,"\u00f4":11,"\u00f2":11,"\u00f3":11,"\u00eb":8,"\u00ea":8,"\u00e8":8,"\u00e9":8,"\u00d6":10,"\u00c9":8,"\u00c7":10,"y":7,"o":11,"g":2,"e":8,"c":2,"Y":14,"V":11,"T":12,"S":3,"Q":10,"O":10,"L":8,"G":10,"E":8,"C":10}},"S":{"d":"82,-134v-69,-49,-17,-137,73,-137v21,0,59,4,75,8v10,9,-3,30,-2,43v-1,4,-3,6,-8,6v-37,-3,-62,-4,-76,-4v-33,0,-44,33,-13,44v30,23,78,37,80,85v4,90,-100,106,-180,84v-15,-4,1,-29,0,-42v18,-23,118,24,114,-32v-2,-26,-43,-41,-63,-55","w":211,"k":{"y":3,"x":2,"w":8,"v":3,"t":8,"Y":6,"W":4,"V":4,"A":3}},"T":{"d":"242,-268v14,5,-1,31,0,44v-9,15,-46,4,-67,7r-37,210v-6,14,-38,4,-56,7v-4,-1,-6,-3,-6,-7r37,-210r-59,0v-5,0,-5,-2,-5,-7v5,-15,-1,-39,14,-44r179,0","w":211,"k":{"\u00fd":10,"\u00d2":11,"\u00d4":11,"\u00d3":11,"\u00c8":8,"\u00cb":8,"\u00c1":25,"\u00ca":8,"\u00c2":25,"\u00ff":10,"\u00d5":11,"\u00c3":25,"\u00c0":25,"\u00e6":22,"\u00d8":11,"\u00c6":25,"\u00fc":7,"\u00fb":7,"\u00f9":7,"\u00fa":7,"\u00f5":28,"\u00f6":28,"\u00f4":28,"\u00f2":28,"\u00f3":28,"\u00ee":-8,"\u00eb":24,"\u00ea":24,"\u00e8":24,"\u00e9":24,"\u00e5":22,"\u00e3":22,"\u00e4":22,"\u00e2":22,"\u00e0":22,"\u00e1":22,"\u00d6":11,"\u00c9":8,"\u00c5":25,"\u00c4":25,"z":5,"y":10,"x":6,"w":5,"v":5,"u":7,"s":21,"r":12,"q":23,"p":6,"o":28,"n":6,"m":6,"g":10,"e":24,"d":18,"c":15,"a":22,"Q":11,"O":11,"G":9,"F":6,"E":8,"C":10,"A":25,"\/":29,".":20,"-":21,",":20}},"U":{"d":"225,-268v17,3,47,-8,53,7v-30,108,-2,264,-151,264v-63,0,-96,-38,-85,-103r28,-161v6,-14,38,-4,56,-7v4,1,6,3,6,7r-31,182v-4,43,68,38,78,9v20,-56,24,-129,37,-191v0,-4,5,-7,9,-7","w":255,"k":{"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c6":7,"\u00c5":7,"\u00c4":7,"X":6,"A":7}},"V":{"d":"226,-268v18,3,55,-8,56,8r-93,223v-10,49,-115,59,-119,0r-14,-223v5,-16,38,-5,56,-8v4,0,6,3,6,7r8,208v0,3,1,5,4,5v3,0,4,-1,6,-5r82,-208v2,-4,4,-7,8,-7","w":246,"k":{"\u00fd":5,"\u00d2":9,"\u00d4":9,"\u00d3":9,"\u00c8":12,"\u00cb":12,"\u00c1":20,"\u00ca":12,"\u00c2":20,"\u00ff":5,"\u00d5":9,"\u00c3":20,"\u00c0":20,"\u00a1":4,"\u00bf":36,"\u00e6":18,"\u00d8":9,"\u00c6":20,"\u00fc":12,"\u00fb":12,"\u00f9":12,"\u00fa":12,"\u00f5":18,"\u00f6":18,"\u00f4":18,"\u00f2":18,"\u00f3":18,"\u00ef":-7,"\u00ee":-5,"\u00eb":18,"\u00ea":18,"\u00e8":18,"\u00e9":18,"\u00e5":18,"\u00e3":18,"\u00e4":18,"\u00e2":18,"\u00e0":18,"\u00e1":18,"\u00d6":9,"\u00c9":12,"\u00c5":20,"\u00c4":20,"z":4,"y":5,"x":6,"w":4,"v":4,"u":12,"s":16,"r":9,"q":16,"p":4,"o":18,"n":4,"m":4,"g":15,"e":18,"c":15,"a":18,"S":3,"Q":9,"O":9,"G":8,"F":7,"E":12,"C":10,"A":20,"\/":20,".":20,",":20}},"W":{"d":"49,-36r8,-226v0,-4,2,-6,6,-6r48,0v3,0,4,3,4,7r-11,198v19,-31,33,-70,47,-104v9,-23,34,-16,61,-17v12,0,19,5,20,17v4,34,3,73,10,104v25,-63,36,-140,61,-203v13,-5,35,-1,52,-2v4,0,5,2,5,6r-75,236v-4,31,-52,34,-78,21v-6,-3,-8,-10,-9,-18v-5,-36,-4,-78,-12,-111v-22,32,-35,75,-51,111v-16,36,-88,34,-86,-13","w":320,"k":{"\u00d2":4,"\u00d4":4,"\u00d3":4,"\u00c1":10,"\u00c2":10,"\u00d5":4,"\u00c3":10,"\u00c0":10,"\u00bf":26,"\u00e6":5,"\u00d8":4,"\u00c6":10,"\u00f5":5,"\u00f6":5,"\u00f4":5,"\u00f2":5,"\u00f3":5,"\u00eb":5,"\u00ea":5,"\u00e8":5,"\u00e9":5,"\u00e5":5,"\u00e3":5,"\u00e4":5,"\u00e2":5,"\u00e0":5,"\u00e1":5,"\u00d6":4,"\u00c5":10,"\u00c4":10,"z":5,"x":10,"s":5,"q":5,"o":5,"g":5,"e":5,"d":5,"c":5,"a":5,"S":4,"Q":4,"O":4,"E":4,"A":10}},"X":{"d":"63,-261v-2,-2,1,-7,5,-7v20,3,53,-9,60,7r32,73r53,-73v12,-15,42,-4,64,-7v4,0,7,5,3,7r-96,127r56,129v-9,11,-40,2,-58,5v-4,0,-6,-1,-8,-5r-33,-76r-55,74v-12,15,-42,4,-64,7v-5,0,-7,-5,-3,-7r98,-130","w":253,"k":{"\u00fd":17,"\u00d2":18,"\u00d4":18,"\u00d3":18,"\u00ff":17,"\u00d5":18,"\u00e6":12,"\u00d8":18,"\u00fc":13,"\u00fb":13,"\u00f9":13,"\u00fa":13,"\u00f5":14,"\u00f6":14,"\u00f4":14,"\u00f2":14,"\u00f3":14,"\u00eb":12,"\u00ea":12,"\u00e8":12,"\u00e9":12,"\u00e5":12,"\u00e3":12,"\u00e4":12,"\u00e2":12,"\u00e0":12,"\u00e1":12,"\u00d6":18,"y":17,"v":15,"u":13,"o":14,"e":12,"a":12,"U":6,"Q":18,"O":18,"L":7,"G":17,"E":12,"C":15,"-":15}},"Y":{"d":"137,-160v0,7,10,7,11,0r57,-101v9,-15,42,-4,62,-7v4,0,7,5,4,8r-77,125v-9,15,-18,24,-28,28r-17,100v-6,14,-38,4,-56,7v-4,0,-6,-2,-6,-7r18,-100v-10,-6,-15,-14,-19,-28r-33,-126v7,-15,40,-4,58,-7v3,0,5,3,6,7","w":233,"k":{"\u00fd":15,"\u00d2":16,"\u00d4":16,"\u00d3":16,"\u00c8":13,"\u00cb":13,"\u00c1":27,"\u00ca":13,"\u00c2":27,"\u00ff":15,"\u00d5":16,"\u00c3":27,"\u00c0":27,"\u00a1":20,"\u00bf":50,"\u00e6":32,"\u00d8":16,"\u00c6":27,"\u00fc":24,"\u00fb":24,"\u00f9":24,"\u00fa":24,"\u00f5":35,"\u00f6":35,"\u00f4":35,"\u00f2":35,"\u00f3":35,"\u00ef":-8,"\u00eb":34,"\u00ea":34,"\u00e8":34,"\u00e9":34,"\u00e5":32,"\u00e3":32,"\u00e4":32,"\u00e2":32,"\u00e0":32,"\u00e1":32,"\u00d6":16,"\u00c9":13,"\u00c7":18,"\u00c5":27,"\u00c4":27,"z":23,"y":15,"x":15,"w":16,"v":17,"u":24,"s":24,"r":25,"q":33,"p":25,"o":35,"n":17,"m":17,"g":33,"e":34,"d":33,"c":33,"a":32,"S":3,"Q":16,"O":16,"G":18,"F":13,"E":13,"C":18,"A":27,"\/":35,".":35,"-":20,",":35}},"Z":{"d":"234,-268v24,2,8,37,2,53r-128,160v27,6,66,0,97,2v4,0,7,1,7,6v-6,15,0,43,-16,47r-163,0v-27,-2,-7,-42,0,-56r126,-156v-25,-6,-61,0,-90,-2v-4,0,-6,-2,-6,-7v6,-15,0,-43,16,-47r155,0","w":221,"k":{"\u00fd":5,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":5,"\u00d5":7,"\u00e6":7,"\u00d8":7,"\u00fc":5,"\u00fb":5,"\u00f9":5,"\u00fa":5,"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e5":7,"\u00e3":7,"\u00e4":7,"\u00e2":7,"\u00e0":7,"\u00e1":7,"\u00d6":7,"y":5,"v":5,"u":5,"o":8,"g":10,"e":7,"c":10,"a":7,"Q":7,"O":7,"G":9,"C":4}},"[":{"d":"163,-268v14,4,0,27,1,39v-3,13,-29,5,-43,7r-44,246v14,2,41,-6,41,7v-4,13,1,39,-14,39r-87,0v-4,0,-5,-2,-5,-7r57,-324v0,-4,3,-7,7,-7r87,0","w":134,"k":{"A":13}},"\\":{"d":"51,-260v2,-16,36,-5,53,-8v4,0,6,3,6,8r32,255v-6,14,-37,4,-54,7v-3,0,-4,-3,-5,-8","w":145},"]":{"d":"52,-228v4,-15,0,-36,14,-40r87,0v3,0,5,3,5,7r-57,324v-1,5,-3,7,-7,7r-88,0v-13,-4,0,-27,-1,-39v4,-13,29,-5,44,-7r43,-246v-13,-2,-37,6,-40,-6","w":134},"^":{"d":"235,-211v3,4,3,7,-2,8v-19,-2,-48,6,-58,-6r-29,-32v-14,12,-22,31,-40,38r-47,0v-5,-1,-5,-5,-2,-8r45,-58v24,-4,63,-3,88,0v16,17,30,39,45,58"},"_":{"d":"197,14v12,1,3,19,3,23v-1,4,-3,6,-8,6r-204,0v-12,-1,-3,-19,-3,-23v1,-4,3,-6,8,-6r204,0","w":194},"`":{"d":"144,-233v2,3,1,6,-3,6v-14,-2,-37,5,-44,-4v-12,-16,-27,-29,-37,-47v14,-3,48,-5,58,3","w":159},"a":{"d":"143,-18v-61,54,-143,-3,-111,-89v3,-99,99,-120,190,-90v2,2,2,5,2,8r-32,182v-4,13,-30,5,-45,7v-9,1,-5,-12,-4,-18xm160,-159v-40,-8,-66,5,-69,42v-2,24,-21,71,13,72v11,0,24,-5,39,-13","w":209,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"b":{"d":"116,-207v81,-17,120,36,100,118v-14,56,-41,93,-107,92v-26,0,-51,-3,-75,-9v-8,-3,-11,-4,-10,-11r45,-252v5,-14,35,-4,52,-7v4,0,6,2,6,7xm157,-89v0,-28,19,-73,-19,-72v-10,0,-20,1,-30,2r-20,112v38,7,69,-2,69,-42","w":214,"k":{"\u00fd":7,"\u00ff":7,"y":7,"x":8,"v":7,"t":5,"f":5}},"c":{"d":"56,-171v16,-36,95,-51,134,-27v-5,14,0,36,-14,41v-42,-7,-78,-4,-81,39v-2,26,-21,74,17,72v16,4,45,-11,51,3v-5,14,0,37,-15,41v-63,18,-134,-8,-116,-86v7,-30,10,-65,24,-83","w":170,"k":{"\u00f5":12,"\u00f6":12,"\u00f4":12,"\u00f2":12,"\u00f3":12,"\u00eb":8,"\u00ea":8,"\u00e8":8,"\u00e9":8,"\u00e7":6,"o":12,"e":8,"c":5,"a":5}},"d":{"d":"234,-276v4,0,7,2,6,7r-44,252v-14,21,-56,17,-91,20v-108,8,-85,-177,-16,-203v20,-8,54,-12,82,-7r11,-62v5,-14,35,-4,52,-7xm94,-117v-2,27,-21,74,19,72v10,0,20,-1,30,-2r20,-112v-40,-6,-66,1,-69,42","w":214},"e":{"d":"56,-167v39,-69,189,-49,160,53v-3,10,0,29,-12,29r-116,0v-15,58,60,37,102,37v12,5,-2,29,-2,40v-69,25,-176,13,-156,-81v6,-29,13,-58,24,-78xm162,-121v5,-24,0,-41,-26,-41v-22,0,-36,13,-42,41r68,0","w":212,"k":{"\u00fd":7,"\u00ff":7,"y":7,"x":8,"v":7,"t":5,"f":7,"T":22}},"f":{"d":"77,-206v-3,-61,59,-95,109,-65v-4,17,0,38,-31,33v-19,-3,-15,17,-19,32v11,2,39,-6,36,7v-5,11,2,36,-13,36r-31,0v-15,66,-15,150,-44,203v-11,19,-30,22,-60,22v-4,-1,-30,1,-31,-9v4,-15,-2,-38,26,-34v18,3,20,-5,22,-19r28,-163v-11,-4,-33,3,-33,-13v4,-10,-1,-30,13,-30r28,0","w":141,"k":{"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"s":2,"q":5,"o":4,"g":5,"e":4,"d":4,"c":3,".":21,",":21}},"g":{"d":"51,-171v23,-45,124,-48,172,-22v-16,75,-19,161,-45,227v-17,45,-104,46,-156,29v-10,-6,-5,-40,8,-40v50,0,73,13,97,-6r6,-20v-76,18,-124,-33,-101,-114v6,-22,12,-40,19,-54xm103,-150v-15,24,-39,105,10,103v7,0,16,-1,28,-3r19,-108v-21,-4,-47,-8,-57,8","w":206},"h":{"d":"116,-204v59,-17,117,6,106,71r-22,126v-5,14,-35,4,-52,7v-4,0,-7,-2,-6,-7r23,-136v2,-27,-37,-19,-57,-16r-27,151v-3,15,-35,5,-52,8v-4,0,-6,-3,-6,-8r46,-261v5,-14,35,-4,52,-7v4,0,6,2,6,7","w":220,"k":{"\u00fd":7,"\u00ff":7,"y":7,"w":7,"v":7,"t":5,"f":5}},"i":{"d":"63,-235v4,-16,0,-38,15,-43r47,0v10,7,5,44,-9,48v-17,-3,-45,6,-53,-5xm67,-206v16,3,47,-8,50,7r-34,192v-6,14,-36,4,-53,7v-4,-1,-6,-3,-6,-7r34,-192v0,-4,5,-7,9,-7","w":104},"j":{"d":"78,-278v17,4,49,-9,52,8v-4,14,1,38,-15,40v-16,-3,-47,8,-52,-7v5,-14,0,-37,15,-41xm58,-199v5,-14,36,-4,53,-7v4,0,5,3,5,7r-37,211v-5,39,-23,63,-67,61v-12,-1,-33,2,-35,-10v2,-22,4,-41,37,-36v5,-3,5,-8,7,-15","w":104},"k":{"d":"69,-269v5,-14,35,-4,52,-7v4,0,6,2,6,7r-25,146r65,-78v14,-12,43,-2,65,-5v5,0,7,3,3,7r-87,91r52,103v0,3,-2,5,-5,5v-21,-3,-54,9,-62,-8r-37,-82r-15,82v-3,15,-35,5,-52,8v-4,0,-6,-3,-6,-8","w":211,"k":{"\u00e6":13,"\u00fc":9,"\u00fb":9,"\u00f9":9,"\u00fa":9,"\u00f5":13,"\u00f6":13,"\u00f4":13,"\u00f2":13,"\u00f3":13,"\u00eb":14,"\u00ea":14,"\u00e8":14,"\u00e9":14,"\u00e5":13,"\u00e3":13,"\u00e4":13,"\u00e2":13,"\u00e0":13,"\u00e1":13,"u":9,"q":13,"o":13,"g":13,"e":14,"d":13,"c":13,"a":13}},"l":{"d":"122,-276v4,0,5,3,5,7r-46,261v-4,15,-35,5,-52,8v-4,0,-6,-3,-6,-8r46,-261v6,-14,36,-4,53,-7","w":101},"m":{"d":"202,-193v47,-35,128,-17,114,63r-21,122v-3,15,-35,5,-53,8v-5,0,-5,-3,-5,-8r23,-138v1,-22,-33,-14,-48,-9v-3,52,-17,98,-24,147v-3,15,-35,5,-52,8v-4,0,-7,-3,-6,-8r23,-139v-4,-23,-28,-11,-47,-2r-25,141v-3,15,-35,5,-52,8v-4,0,-6,-3,-6,-8r34,-191v4,-13,32,-5,47,-7v8,-2,8,9,5,15v31,-22,69,-26,93,-2","w":315,"k":{"y":5,"v":7,"t":5,"f":7}},"n":{"d":"109,-190v44,-38,126,-18,112,63r-21,119v-3,15,-35,5,-52,8v-5,0,-6,-3,-6,-8r23,-135v0,-30,-46,-15,-59,-6r-25,141v-3,15,-35,5,-52,8v-4,0,-6,-3,-6,-8r34,-191v4,-13,32,-5,47,-7v8,-2,7,10,5,16","w":220,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":6,"v":9,"t":5,"f":7}},"o":{"d":"56,-169v40,-66,185,-49,161,54v-15,66,-33,118,-112,118v-92,0,-83,-116,-49,-172xm94,-115v-4,27,-17,70,20,69v41,-1,42,-47,46,-86v3,-31,-37,-34,-52,-17v-7,7,-11,19,-14,34","w":212,"k":{"\u00fd":8,"\u00ff":8,"z":6,"y":8,"x":14,"w":5,"v":7,"t":7,"f":7}},"p":{"d":"58,-196v70,-28,178,-19,162,79v-13,81,-47,133,-140,118r-11,62v-5,14,-35,4,-52,7v-4,0,-7,-2,-7,-7xm157,-89v3,-27,21,-75,-19,-72v-12,0,-22,1,-30,2r-20,112v41,6,65,-1,69,-42","w":214,"k":{"\u00fd":7,"\u00ff":7,"y":7,"x":10,"w":2,"v":7,"t":5,"f":7}},"q":{"d":"135,1v-79,17,-126,-38,-99,-118v3,-89,104,-109,188,-80v3,2,4,5,2,8r-44,252v-5,14,-35,4,-52,7v-4,0,-6,-2,-6,-7xm94,-117v-2,29,-19,76,21,72v5,0,14,-1,28,-2r20,-112v-36,-7,-66,3,-69,42","w":214},"r":{"d":"113,-192v12,-12,28,-18,51,-17v14,5,-1,29,0,41v-2,6,-3,7,-9,7v-16,0,-32,5,-49,13r-25,140v-3,15,-35,5,-52,8v-5,0,-6,-3,-6,-8r34,-191v5,-14,34,-4,51,-7v8,-1,6,8,5,14","w":142,"k":{"\u00e6":8,"\u00f5":7,"\u00f6":7,"\u00f4":7,"\u00f2":7,"\u00f3":7,"\u00eb":6,"\u00ea":6,"\u00e8":6,"\u00e9":6,"\u00e5":8,"\u00e3":8,"\u00e4":8,"\u00e2":8,"\u00e0":8,"\u00e1":8,"q":4,"o":7,"g":3,"e":6,"d":7,"c":5,"a":8,".":11,",":11}},"s":{"d":"65,-102v-54,-40,-8,-107,61,-107v21,0,41,1,62,8v14,5,0,26,1,38v-1,5,-4,6,-9,6v-23,-3,-42,-4,-60,-4v-19,0,-28,13,-11,24v25,16,68,35,68,70v0,74,-88,79,-153,62v-12,-6,1,-25,0,-37v9,-16,44,2,70,-2v25,4,31,-19,13,-31","w":181,"k":{"v":2,"t":2}},"t":{"d":"140,-206v12,3,35,-7,35,7v-4,12,0,33,-13,36r-30,0r-20,115v-1,17,31,-3,35,13v-4,12,0,32,-13,35v-49,11,-88,-4,-79,-58r18,-105v-11,-4,-33,2,-34,-12v3,-11,0,-30,13,-31r29,0v4,-13,-1,-34,14,-37r46,-7v4,0,6,1,6,5","w":151,"k":{"\u00f5":4,"\u00f6":4,"\u00f4":4,"\u00f2":4,"\u00f3":4,"\u00eb":4,"\u00ea":4,"\u00e8":4,"\u00e9":4,"\u00e7":2,"q":2,"o":4,"g":2,"e":4,"d":2,"c":2}},"u":{"d":"175,-199v7,-12,55,-12,59,0r-34,192v-5,14,-33,4,-49,7v-8,-1,-6,-10,-4,-16v-45,39,-125,17,-111,-63r21,-120v5,-14,35,-4,52,-7v5,0,6,3,6,7r-23,137v0,29,45,13,58,5","w":220},"v":{"d":"233,-206v5,-1,5,3,5,8r-75,163v-8,43,-98,59,-104,0r-16,-164v5,-15,36,-4,53,-7v4,0,6,2,6,7r6,141v0,12,8,9,11,0r56,-141v8,-15,39,-4,58,-7","w":210,"k":{"\u00e6":8,"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e5":8,"\u00e3":8,"\u00e4":8,"\u00e2":8,"\u00e0":8,"\u00e1":8,"q":8,"o":8,"g":10,"e":7,"d":7,"a":8,".":20,",":20}},"w":{"d":"145,-158v6,-25,70,-27,70,0v0,32,2,70,9,99v22,-44,29,-103,52,-146v14,-3,33,0,49,-1v4,0,4,3,4,7r-63,174v-2,32,-81,39,-84,2r-9,-96v-17,30,-28,65,-43,96v-6,31,-83,36,-84,-2r-1,-174v3,-14,33,-4,49,-7v4,0,7,1,6,6r-1,142v18,-30,30,-68,46,-100","w":304,"k":{"\u00e6":4,"\u00f5":5,"\u00f6":5,"\u00f4":5,"\u00f2":5,"\u00f3":5,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e5":4,"\u00e3":4,"\u00e4":4,"\u00e2":4,"\u00e0":4,"\u00e1":4,"o":5,"e":7,"c":4,"a":4,".":14,",":10}},"x":{"d":"176,-199v12,-14,48,-7,62,-4v-22,37,-53,65,-77,99r49,99v0,4,-2,5,-5,5v-19,-3,-52,8,-59,-8r-26,-55v-18,20,-30,49,-54,63v-16,-2,-41,4,-52,-3v25,-37,56,-69,83,-104r-47,-94v9,-11,43,-4,61,-4r26,56","w":222,"k":{"\u00e6":22,"\u00fc":8,"\u00fb":8,"\u00f9":8,"\u00fa":8,"\u00f5":15,"\u00f6":15,"\u00f4":15,"\u00f2":15,"\u00f3":15,"\u00eb":15,"\u00ea":15,"\u00e8":15,"\u00e9":15,"\u00e5":22,"\u00e3":22,"\u00e4":22,"\u00e2":22,"\u00e0":22,"\u00e1":22,"w":8,"u":11,"t":9,"q":17,"o":15,"g":15,"e":15,"d":17,"c":11,"a":22}},"y":{"d":"235,-206v5,-1,5,3,5,8r-113,240v-14,32,-92,43,-123,18v5,-12,-1,-34,14,-36v32,6,78,5,75,-26v-21,0,-28,-12,-31,-34r-19,-163v0,-5,2,-7,8,-7r47,0v3,0,6,1,6,6r8,138v-1,5,3,5,7,5r59,-143v9,-14,38,-3,57,-6","w":213,"k":{"\u00e6":9,"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e7":10,"\u00e5":9,"\u00e3":9,"\u00e4":9,"\u00e2":9,"\u00e0":9,"\u00e1":9,"q":7,"o":8,"g":9,"e":7,"d":5,"c":10,"a":9,".":22,",":20}},"z":{"d":"48,-164v4,-15,0,-38,14,-42r132,0v20,2,5,39,-1,51r-91,105v20,3,48,0,70,1v4,0,6,2,6,6v-5,14,-1,38,-15,43r-135,0v-22,-1,-7,-40,1,-49r96,-109v-21,-3,-49,0,-72,-1v-3,0,-5,-2,-5,-5","w":185,"k":{"\u00f5":6,"\u00f6":6,"\u00f4":6,"\u00f2":6,"\u00f3":6,"\u00eb":8,"\u00ea":8,"\u00e8":8,"\u00e9":8,"o":6,"e":8,"d":2}},"{":{"d":"80,-236v5,-31,79,-44,101,-24v-3,21,0,45,-34,38v-37,9,-11,86,-45,111v-6,4,-13,9,-21,13v35,18,15,75,10,113v-3,20,36,-2,39,16v-3,21,0,47,-35,39v-46,2,-68,-21,-61,-67v5,-29,22,-67,-5,-84r6,-34v40,-18,26,-84,45,-121","w":146},"|":{"d":"47,-260v8,-15,55,-12,60,0r0,322v-4,16,-35,5,-52,8v-4,1,-8,-5,-8,-8r0,-322","w":104},"}":{"d":"149,-219v0,36,-27,85,3,104r-5,34v-61,28,0,165,-120,151v-10,-2,-28,5,-27,-7v2,-21,0,-47,35,-39v40,-14,6,-109,65,-122v-35,-21,-15,-75,-10,-115v2,-20,-34,2,-38,-16v3,-21,0,-46,34,-39v37,0,63,12,63,49","w":146},"~":{"d":"165,-166v14,10,29,5,25,-16v1,-14,26,-5,39,-7v9,-1,8,8,8,16v0,52,-47,67,-85,44v-12,-7,-24,-18,-41,-20v-18,-3,-4,24,-17,28v-15,-3,-44,10,-40,-14v-5,-49,41,-68,78,-50"},"\u00c4":{"d":"179,0v-4,0,-7,-3,-7,-7r-2,-59r-74,0r-23,59v-8,15,-40,4,-60,7v-5,1,-6,-4,-4,-8r93,-223v11,-40,65,-49,103,-32v9,4,15,16,16,32r14,224v-6,15,-38,4,-56,7xm168,-115r-4,-99v0,-8,-8,-8,-9,0r-40,99r53,0xm194,-329v5,-14,48,-13,49,0v-5,13,0,37,-15,40v-13,-3,-38,7,-40,-7xm159,-296v-6,12,-47,12,-49,0v5,-14,0,-38,15,-41v13,3,39,-8,40,8","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"G":7,"C":7}},"\u00c5":{"d":"176,-364v25,0,40,18,41,42v0,24,-17,42,-41,41v-22,0,-42,-18,-42,-41v0,-23,19,-43,42,-42xm176,-307v10,0,16,-8,16,-16v0,-8,-7,-15,-16,-15v-8,0,-16,7,-16,15v0,8,7,16,16,16xm179,0v-4,0,-7,-3,-7,-7r-2,-59r-74,0r-23,59v-8,15,-40,4,-60,7v-5,1,-6,-4,-4,-8r93,-223v11,-40,65,-49,103,-32v9,4,15,16,16,32r14,224v-6,15,-38,4,-56,7xm168,-115r-4,-99v0,-8,-8,-8,-9,0r-40,99r53,0","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"G":7,"C":7}},"\u00c7":{"d":"94,-249v28,-21,111,-34,139,-8v-6,13,0,39,-16,42v-59,-8,-99,0,-108,58v-7,44,-27,123,46,106v12,2,41,-9,40,5v-5,15,0,38,-15,43v-77,22,-162,-13,-142,-108v11,-54,21,-111,56,-138xm149,13v4,0,3,3,1,5v-21,15,-36,37,-61,48v-14,-1,-32,3,-42,-2v17,-17,31,-40,54,-51r48,0","w":201,"k":{"\u00fd":3,"\u00d2":8,"\u00d4":8,"\u00d3":8,"\u00ff":3,"\u00d5":8,"\u00d8":8,"\u00d6":8,"y":3,"Q":8,"O":8}},"\u00c9":{"d":"72,-235v18,-42,120,-45,163,-25v-7,12,0,39,-15,42v-36,7,-95,-17,-100,24r-6,33r93,0v14,5,-1,29,0,41v0,5,-5,8,-9,8r-93,0v0,22,-23,62,12,62r73,0v14,5,-1,29,0,41v-1,4,-3,7,-8,8v-69,10,-163,9,-145,-73v12,-52,17,-118,35,-161xm230,-339v5,0,5,3,2,5v-21,15,-37,37,-62,48v-15,-1,-34,3,-45,-2v17,-17,32,-39,54,-51r51,0","w":209},"\u00d1":{"d":"146,-298v2,17,-37,20,-38,6v-1,-48,60,-65,91,-32v12,12,24,7,24,-10v2,-11,21,-4,32,-6v7,-1,5,8,4,13v2,49,-64,54,-90,25v-8,-9,-21,-9,-23,4xm226,-261v8,-12,54,-12,57,0r-43,247v-3,21,-58,21,-66,3r-63,-145v-13,46,-16,101,-28,149v-4,14,-34,4,-51,7v-4,0,-5,-3,-5,-7r43,-247v3,-21,56,-21,63,-2r64,151v16,-46,17,-106,29,-156","w":262},"\u00d6":{"d":"64,-210v34,-79,206,-87,198,27v-8,99,-28,186,-137,186v-111,0,-93,-139,-61,-213xm109,-155v-7,39,-28,107,26,104v58,-3,58,-73,65,-128v6,-49,-66,-47,-80,-12v-4,10,-8,21,-11,36xm196,-329v5,-14,48,-13,49,0v-5,13,0,37,-15,40v-13,-3,-38,7,-40,-7xm161,-296v-6,12,-47,12,-49,0v5,-14,0,-38,15,-41v13,3,39,-8,40,8","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"\u00dc":{"d":"225,-268v17,3,47,-8,53,7v-30,108,-2,264,-151,264v-63,0,-96,-38,-85,-103r28,-161v6,-14,38,-4,56,-7v4,1,6,3,6,7r-31,182v-4,43,68,38,78,9v20,-56,24,-129,37,-191v0,-4,5,-7,9,-7xm200,-329v5,-14,48,-13,49,0v-5,13,0,37,-15,40v-13,-3,-38,7,-40,-7xm165,-296v-6,12,-47,12,-49,0v5,-14,0,-38,15,-41v13,3,39,-8,40,8","w":255,"k":{"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"A":7}},"\u00e1":{"d":"143,-18v-61,54,-143,-3,-111,-89v3,-99,99,-120,190,-90v2,2,2,5,2,8r-32,182v-4,13,-30,5,-45,7v-9,1,-5,-12,-4,-18xm160,-159v-40,-8,-66,5,-69,42v-2,24,-21,71,13,72v11,0,24,-5,39,-13xm223,-280v5,0,5,3,2,5v-21,15,-37,37,-62,48v-15,-1,-34,3,-45,-2v17,-17,32,-39,54,-51r51,0","w":209,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"\u00e0":{"d":"143,-18v-61,54,-143,-3,-111,-89v3,-99,99,-120,190,-90v2,2,2,5,2,8r-32,182v-4,13,-30,5,-45,7v-9,1,-5,-12,-4,-18xm160,-159v-40,-8,-66,5,-69,42v-2,24,-21,71,13,72v11,0,24,-5,39,-13xm178,-233v2,3,1,6,-3,6v-14,-2,-37,5,-44,-4v-12,-16,-27,-29,-37,-47v14,-3,48,-5,58,3","w":209,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"\u00e2":{"d":"218,-233v2,3,0,6,-3,6v-14,-2,-36,5,-43,-4r-18,-25v-12,9,-21,24,-37,29v-14,-1,-32,3,-42,-2v15,-18,31,-39,52,-51v22,3,54,-6,67,5xm143,-18v-61,54,-143,-3,-111,-89v3,-99,99,-120,190,-90v2,2,2,5,2,8r-32,182v-4,13,-30,5,-45,7v-9,1,-5,-12,-4,-18xm160,-159v-40,-8,-66,5,-69,42v-2,24,-21,71,13,72v11,0,24,-5,39,-13","w":209,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"\u00e4":{"d":"143,-18v-61,54,-143,-3,-111,-89v3,-99,99,-120,190,-90v2,2,2,5,2,8r-32,182v-4,13,-30,5,-45,7v-9,1,-5,-12,-4,-18xm160,-159v-40,-8,-66,5,-69,42v-2,24,-21,71,13,72v11,0,24,-5,39,-13xm170,-271v5,-14,48,-13,49,0v-5,13,0,37,-15,40v-13,-3,-38,7,-40,-7xm135,-238v-6,12,-47,12,-49,0v5,-14,0,-38,15,-41v13,3,39,-8,40,8","w":209,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"\u00e3":{"d":"110,-234v-5,14,-48,10,-35,-6v-1,-47,62,-55,89,-26v12,13,25,7,25,-10v0,-12,21,-4,32,-6v17,34,-32,77,-73,49v-9,-10,-36,-31,-38,-1xm143,-18v-61,54,-143,-3,-111,-89v3,-99,99,-120,190,-90v2,2,2,5,2,8r-32,182v-4,13,-30,5,-45,7v-9,1,-5,-12,-4,-18xm160,-159v-40,-8,-66,5,-69,42v-2,24,-21,71,13,72v11,0,24,-5,39,-13","w":209,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"\u00e5":{"d":"152,-309v24,1,42,18,42,42v0,23,-19,41,-42,42v-22,1,-42,-19,-42,-42v0,-23,19,-43,42,-42xm152,-251v9,0,16,-7,16,-16v0,-9,-7,-16,-16,-16v-8,0,-15,8,-15,16v0,8,7,16,15,16xm143,-18v-61,54,-143,-3,-111,-89v3,-99,99,-120,190,-90v2,2,2,5,2,8r-32,182v-4,13,-30,5,-45,7v-9,1,-5,-12,-4,-18xm160,-159v-40,-8,-66,5,-69,42v-2,24,-21,71,13,72v11,0,24,-5,39,-13","w":209,"k":{"\u00fd":8,"\u00ff":8,"y":8,"w":7,"v":8,"t":8,"f":7}},"\u00e7":{"d":"56,-171v16,-36,95,-51,134,-27v-5,14,0,36,-14,41v-42,-7,-78,-4,-81,39v-2,26,-21,74,17,72v16,4,45,-11,51,3v-5,14,0,37,-15,41v-63,18,-134,-8,-116,-86v7,-30,10,-65,24,-83xm118,13v4,0,5,3,2,5v-28,19,-48,61,-103,46v12,-18,29,-31,43,-46v11,-12,39,-2,58,-5","w":170,"k":{"\u00f5":12,"\u00f6":12,"\u00f4":12,"\u00f2":12,"\u00f3":12,"\u00eb":8,"\u00ea":8,"\u00e8":8,"\u00e9":8,"o":12,"e":8}},"\u00e9":{"d":"56,-167v39,-69,189,-49,160,53v-3,10,0,29,-12,29r-116,0v-15,58,60,37,102,37v12,5,-2,29,-2,40v-69,25,-176,13,-156,-81v6,-29,13,-58,24,-78xm162,-121v5,-24,0,-41,-26,-41v-22,0,-36,13,-42,41r68,0xm216,-280v5,0,5,3,2,5v-21,15,-37,37,-62,48v-15,-1,-34,3,-45,-2v17,-17,32,-39,54,-51r51,0","w":212,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":5,"f":7}},"\u00e8":{"d":"56,-167v39,-69,189,-49,160,53v-3,10,0,29,-12,29r-116,0v-15,58,60,37,102,37v12,5,-2,29,-2,40v-69,25,-176,13,-156,-81v6,-29,13,-58,24,-78xm162,-121v5,-24,0,-41,-26,-41v-22,0,-36,13,-42,41r68,0xm185,-233v2,3,1,6,-3,6v-14,-2,-37,5,-44,-4v-12,-16,-27,-29,-37,-47v14,-3,48,-5,58,3","w":212,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":5,"f":7}},"\u00ea":{"d":"217,-233v2,3,0,6,-3,6v-14,-2,-36,5,-43,-4r-18,-25v-12,9,-20,25,-37,29v-14,-1,-32,3,-42,-2v17,-17,30,-41,53,-51v21,3,53,-6,66,5xm56,-167v39,-69,189,-49,160,53v-3,10,0,29,-12,29r-116,0v-15,58,60,37,102,37v12,5,-2,29,-2,40v-69,25,-176,13,-156,-81v6,-29,13,-58,24,-78xm162,-121v5,-24,0,-41,-26,-41v-22,0,-36,13,-42,41r68,0","w":212,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":5,"f":7}},"\u00eb":{"d":"56,-167v39,-69,189,-49,160,53v-3,10,0,29,-12,29r-116,0v-15,58,60,37,102,37v12,5,-2,29,-2,40v-69,25,-176,13,-156,-81v6,-29,13,-58,24,-78xm162,-121v5,-24,0,-41,-26,-41v-22,0,-36,13,-42,41r68,0xm168,-270v5,-14,48,-13,49,0v-5,13,0,37,-15,40v-13,-3,-38,7,-40,-7xm133,-237v-6,12,-47,12,-49,0v5,-14,0,-38,15,-41v13,3,39,-8,40,8","w":212,"k":{"\u00fd":7,"\u00ff":7,"y":7,"v":7,"t":5,"f":7}},"\u00ed":{"d":"67,-206v16,3,47,-8,50,7r-34,192v-6,14,-36,4,-53,7v-4,-1,-6,-3,-6,-7r34,-192v0,-4,5,-7,9,-7xm166,-280v5,0,5,3,2,5v-21,15,-37,37,-62,48v-15,-1,-34,3,-45,-2v17,-17,32,-39,54,-51r51,0","w":104},"\u00ec":{"d":"67,-206v16,3,47,-8,50,7r-34,192v-6,14,-36,4,-53,7v-4,-1,-6,-3,-6,-7r34,-192v0,-4,5,-7,9,-7xm122,-233v2,3,1,6,-3,6v-14,-2,-37,5,-44,-4v-12,-16,-27,-29,-37,-47v14,-3,48,-5,58,3","w":104},"\u00ee":{"d":"164,-233v2,3,0,6,-3,6v-14,-2,-36,5,-43,-4r-18,-25v-12,9,-21,24,-37,29v-14,-1,-32,3,-42,-2v15,-18,31,-39,52,-51v22,3,54,-6,67,5xm67,-206v16,3,47,-8,50,7r-34,192v-6,14,-36,4,-53,7v-4,-1,-6,-3,-6,-7r34,-192v0,-4,5,-7,9,-7","w":104},"\u00ef":{"d":"67,-206v16,3,47,-8,50,7r-34,192v-6,14,-36,4,-53,7v-4,-1,-6,-3,-6,-7r34,-192v0,-4,5,-7,9,-7xm115,-270v5,-14,48,-13,49,0v-5,13,0,37,-15,40v-13,-3,-38,7,-40,-7xm80,-237v-6,12,-47,12,-49,0v5,-14,0,-38,15,-41v13,3,39,-8,40,8","w":104},"\u00f1":{"d":"116,-240v2,17,-37,20,-38,6v-2,-49,61,-64,91,-32v12,12,24,7,24,-10v2,-11,21,-4,32,-6v7,-1,5,8,4,13v1,48,-64,55,-90,25v-7,-9,-22,-10,-23,4xm109,-190v44,-38,126,-18,112,63r-21,119v-3,15,-35,5,-52,8v-5,0,-6,-3,-6,-8r23,-135v0,-30,-46,-15,-59,-6r-25,141v-3,15,-35,5,-52,8v-4,0,-6,-3,-6,-8r34,-191v4,-13,32,-5,47,-7v8,-2,7,10,5,16","w":220,"k":{"\u00fd":8,"\u00ff":8,"y":8,"v":9,"t":5}},"\u00f3":{"d":"56,-169v40,-66,185,-49,161,54v-15,66,-33,118,-112,118v-92,0,-83,-116,-49,-172xm94,-115v-4,27,-17,70,20,69v41,-1,42,-47,46,-86v3,-31,-37,-34,-52,-17v-7,7,-11,19,-14,34xm215,-280v5,0,5,3,2,5v-21,15,-37,37,-62,48v-15,-1,-34,3,-45,-2v17,-17,32,-39,54,-51r51,0","w":212,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":14,"w":5,"v":7,"t":7}},"\u00f2":{"d":"56,-169v40,-66,185,-49,161,54v-15,66,-33,118,-112,118v-92,0,-83,-116,-49,-172xm94,-115v-4,27,-17,70,20,69v41,-1,42,-47,46,-86v3,-31,-37,-34,-52,-17v-7,7,-11,19,-14,34xm178,-233v2,3,1,6,-3,6v-14,-2,-37,5,-44,-4v-12,-16,-27,-29,-37,-47v14,-3,48,-5,58,3","w":212,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":14,"w":5,"v":7,"t":7}},"\u00f4":{"d":"217,-233v2,3,0,6,-3,6v-14,-2,-36,5,-43,-4r-18,-25v-12,9,-21,24,-37,29v-14,-1,-32,3,-42,-2v15,-18,31,-39,52,-51v22,3,54,-6,67,5xm56,-169v40,-66,185,-49,161,54v-15,66,-33,118,-112,118v-92,0,-83,-116,-49,-172xm94,-115v-4,27,-17,70,20,69v41,-1,42,-47,46,-86v3,-31,-37,-34,-52,-17v-7,7,-11,19,-14,34","w":212,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":14,"w":5,"v":7,"t":7}},"\u00f6":{"d":"56,-169v40,-66,185,-49,161,54v-15,66,-33,118,-112,118v-92,0,-83,-116,-49,-172xm94,-115v-4,27,-17,70,20,69v41,-1,42,-47,46,-86v3,-31,-37,-34,-52,-17v-7,7,-11,19,-14,34xm168,-270v5,-14,48,-13,49,0v-5,13,0,37,-15,40v-13,-3,-38,7,-40,-7xm133,-237v-6,12,-47,12,-49,0v5,-14,0,-38,15,-41v13,3,39,-8,40,8","w":212,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":14,"w":5,"v":7,"t":7}},"\u00f5":{"d":"190,-276v6,-12,45,-10,35,7v2,49,-64,54,-89,25v-10,-12,-25,-6,-25,10v0,11,-33,12,-37,1v-1,-48,60,-67,91,-33v12,12,25,7,25,-10xm56,-169v40,-66,185,-49,161,54v-15,66,-33,118,-112,118v-92,0,-83,-116,-49,-172xm94,-115v-4,27,-17,70,20,69v41,-1,42,-47,46,-86v3,-31,-37,-34,-52,-17v-7,7,-11,19,-14,34","w":212,"k":{"\u00fd":8,"\u00ff":8,"y":8,"x":14,"w":5,"v":7,"t":7}},"\u00fa":{"d":"175,-199v7,-12,55,-12,59,0r-34,192v-5,14,-33,4,-49,7v-8,-1,-6,-10,-4,-16v-45,39,-125,17,-111,-63r21,-120v5,-14,35,-4,52,-7v5,0,6,3,6,7r-23,137v0,29,45,13,58,5xm223,-280v5,0,5,3,2,5v-21,15,-37,37,-62,48v-15,-1,-34,3,-45,-2v17,-17,32,-39,54,-51r51,0","w":220},"\u00f9":{"d":"175,-199v7,-12,55,-12,59,0r-34,192v-5,14,-33,4,-49,7v-8,-1,-6,-10,-4,-16v-45,39,-125,17,-111,-63r21,-120v5,-14,35,-4,52,-7v5,0,6,3,6,7r-23,137v0,29,45,13,58,5xm181,-233v2,3,1,6,-3,6v-14,-2,-37,5,-44,-4v-12,-16,-27,-29,-37,-47v14,-3,48,-5,58,3","w":220},"\u00fb":{"d":"221,-233v2,3,0,6,-3,6v-14,-2,-36,5,-43,-4r-18,-25v-12,9,-21,24,-37,29v-14,-1,-32,3,-42,-2v16,-17,30,-40,52,-51v22,3,54,-6,67,5xm175,-199v7,-12,55,-12,59,0r-34,192v-5,14,-33,4,-49,7v-8,-1,-6,-10,-4,-16v-45,39,-125,17,-111,-63r21,-120v5,-14,35,-4,52,-7v5,0,6,3,6,7r-23,137v0,29,45,13,58,5","w":220},"\u00fc":{"d":"175,-199v7,-12,55,-12,59,0r-34,192v-5,14,-33,4,-49,7v-8,-1,-6,-10,-4,-16v-45,39,-125,17,-111,-63r21,-120v5,-14,35,-4,52,-7v5,0,6,3,6,7r-23,137v0,29,45,13,58,5xm172,-270v5,-14,48,-13,49,0v-5,13,0,37,-15,40v-13,-3,-38,7,-40,-7xm137,-237v-6,12,-47,12,-49,0v5,-14,0,-38,15,-41v13,3,39,-8,40,8","w":220},"\u00b0":{"d":"102,-271v32,2,55,21,55,56v0,33,-22,53,-55,55v-29,1,-56,-26,-56,-55v0,-29,26,-58,56,-56xm102,-189v13,0,26,-13,26,-26v0,-14,-12,-28,-26,-27v-15,1,-26,10,-26,27v0,13,13,26,26,26","w":129},"\u00a2":{"d":"182,-208v13,3,38,-1,34,13v-3,13,2,36,-14,38v-42,-7,-75,-6,-80,39v-4,30,-22,82,30,72v12,1,34,-10,37,3v-4,14,1,37,-14,41v-9,2,-19,3,-30,4v-4,12,1,33,-13,34v-14,-3,-40,7,-42,-7r5,-30v-71,-36,-35,-197,36,-203v4,-13,-1,-35,14,-37v14,3,40,-7,42,7"},"\u00a3":{"d":"97,-239v17,-37,114,-43,152,-18v-5,13,1,39,-14,42v-45,-2,-91,-18,-97,25r-5,30r61,0v14,4,-1,29,0,42v-1,5,-4,6,-8,6r-61,0v-5,23,-6,47,-19,64r99,0v15,5,-2,29,-1,41v1,5,-5,7,-8,7r-163,-2v-4,-43,34,-62,32,-110v-8,-2,-24,5,-24,-6v5,-19,-2,-49,32,-42v6,-27,11,-62,24,-79"},"\u00a7":{"d":"152,-271v24,2,74,-2,83,15v-5,13,0,36,-12,42v-34,-2,-60,-3,-78,-3v-38,0,-43,30,-12,44v33,15,80,41,80,84v0,17,-7,35,-20,54v30,95,-79,135,-176,105v-15,-5,2,-30,1,-44v22,-20,112,25,116,-30v-21,-43,-101,-48,-101,-113v0,-20,11,-43,22,-53v-24,-63,33,-106,97,-101xm156,-65v22,-45,-40,-53,-65,-75v-27,42,42,56,65,75","w":211},"\u00b6":{"d":"154,-87v-74,8,-122,-26,-105,-100v12,-52,42,-81,102,-81r107,0v4,0,5,3,5,7r-58,324v0,10,-24,11,-27,2r54,-305r-23,0r-54,303v1,10,-25,11,-28,2","w":237},"\u00df":{"d":"67,-230v22,-65,183,-72,181,16v0,32,-20,61,-44,71v17,9,27,26,27,48v0,63,-39,99,-104,98v-9,0,-27,2,-27,-9v6,-15,-3,-43,24,-40v34,3,48,-16,48,-49v0,-21,-19,-27,-44,-25v-12,-7,-7,-48,19,-42v39,9,68,-68,12,-67v-32,1,-41,15,-47,44r-31,177v-4,16,-36,5,-53,8v-5,0,-6,-3,-6,-8v15,-73,23,-157,45,-222","w":234},"\u00ae":{"d":"139,-275v60,0,100,39,100,101v0,61,-41,100,-100,100v-60,0,-101,-41,-101,-100v0,-61,41,-101,101,-101xm139,-92v48,0,82,-34,82,-82v0,-48,-34,-83,-82,-83v-49,0,-82,35,-82,83v0,48,33,82,82,82xm102,-236v39,-6,82,-5,82,40v0,15,-7,25,-21,31v8,16,19,29,25,46v-1,7,-26,6,-31,1v-9,-14,-15,-30,-26,-42r-9,0v-2,14,5,39,-4,45v-9,-1,-24,3,-26,-4r0,-106v1,-9,2,-10,10,-11xm121,-182v18,0,36,3,35,-17v-1,-16,-18,-14,-35,-14r0,31","w":215},"\u00a9":{"d":"160,-255v74,0,121,49,121,120v0,71,-48,120,-121,120v-71,0,-119,-48,-119,-120v0,-71,47,-120,119,-120xm160,-34v59,0,102,-42,102,-101v0,-58,-43,-102,-102,-102v-58,0,-101,44,-101,102v0,58,42,101,101,101xm102,-126v-7,-71,40,-105,96,-80v-2,9,5,26,-5,27v-30,-4,-54,-5,-54,33v0,27,1,59,24,56v11,1,30,-7,35,2r0,22v-4,10,-20,7,-35,8v-43,2,-57,-27,-61,-68","w":270},"\u00b4":{"d":"197,-280v5,0,5,3,2,5v-21,15,-37,37,-62,48v-15,-1,-34,3,-45,-2v17,-17,32,-39,54,-51r51,0","w":159},"\u00a8":{"d":"142,-270v5,-14,48,-13,49,0v-5,13,0,37,-15,40v-13,-3,-38,7,-40,-7xm107,-237v-6,12,-47,12,-49,0v5,-14,0,-38,15,-41v13,3,39,-8,40,8","w":159},"\u00c6":{"d":"305,-1v-62,9,-148,12,-137,-65r-71,0r-24,59v-8,15,-40,4,-60,7v-4,0,-6,-4,-4,-8r93,-223v10,-27,31,-37,66,-37r184,0v14,6,-1,30,0,43v0,4,-5,7,-9,7r-87,0r-10,57r84,0v14,5,-1,29,0,41v0,4,-4,8,-8,8r-84,0v0,21,-23,62,11,62r65,0v11,7,4,44,-9,49xm195,-220v-14,2,-36,-6,-40,6r-40,99r62,0","w":332},"\u00d8":{"d":"64,-210v19,-52,114,-82,169,-42v6,-6,10,-16,19,-18v12,2,42,-6,37,7r-34,39v17,104,-10,227,-130,227v-23,0,-43,-6,-58,-18v-7,16,-37,25,-59,15v10,-16,25,-28,37,-43v-21,-51,4,-126,19,-167xm192,-207v-20,-19,-66,-8,-72,16v-11,22,-15,58,-20,87xm199,-162r-92,103v40,23,75,-9,83,-53","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"\u00b1":{"d":"52,-125v2,-13,-6,-38,7,-38r55,0r0,-55v1,-15,25,-5,38,-8v4,0,6,3,6,8r0,55r56,0v14,1,4,26,7,38v0,4,-2,6,-7,6r-56,0r0,56v-1,14,-26,4,-38,7v-4,0,-6,-2,-6,-7r0,-56r-55,0v-5,0,-7,-2,-7,-6xm221,-24v-2,11,6,31,-7,31r-155,0v-13,0,-5,-20,-7,-31v0,-4,2,-6,7,-6r155,0v5,0,7,2,7,6"},"\u00a5":{"d":"59,-260v0,-16,40,-5,57,-8v3,0,5,3,6,7r26,97r60,-97v10,-15,41,-4,62,-7v4,0,7,5,4,8r-54,81v12,3,36,-7,37,7v-4,11,0,33,-13,33r-51,0r-24,37r68,0v13,3,1,23,1,34v1,4,-4,7,-8,6r-68,0r-9,55v-7,14,-39,4,-57,7v-4,0,-5,-3,-5,-7r9,-55r-68,0v-12,-3,-4,-37,7,-40r68,0v1,-12,-8,-25,-10,-37r-51,0v-13,-1,-1,-23,-2,-33v3,-13,27,-5,41,-7"},"\u00b5":{"d":"184,-206v16,3,47,-9,50,8r-32,180v-18,24,-81,23,-122,18r-11,62v-6,14,-36,4,-53,7v-4,-1,-6,-3,-6,-7r47,-260v3,-15,35,-5,52,-8v4,1,6,3,6,8r-22,131v-4,28,36,23,56,20r26,-151v0,-3,5,-9,9,-8","w":220},"\u00aa":{"d":"67,-260v30,-22,97,-14,88,37r-13,72v-21,20,-100,19,-99,-22v1,-40,31,-46,72,-45v6,-28,-11,-21,-48,-19v-9,-2,0,-16,0,-23xm112,-197v-28,-9,-47,29,-17,30v2,0,6,0,12,-1","w":128},"\u00ba":{"d":"58,-239v21,-48,120,-42,104,28v-10,42,-22,71,-69,71v-51,0,-52,-60,-35,-99xm111,-238v-27,-3,-40,65,-12,66v24,0,21,-31,26,-52v-1,-11,-4,-13,-14,-14","w":136},"\u00e6":{"d":"188,-188v49,-44,157,-17,134,70v-3,11,-1,29,-14,30r-111,0v-7,25,-3,45,34,43r65,-3v10,5,2,38,-8,41v-35,10,-101,20,-124,-6v-51,29,-152,23,-137,-53v10,-51,57,-58,118,-57v5,-19,3,-38,-21,-37r-61,2v-8,-8,-1,-39,9,-44v36,-8,96,-14,116,14xm266,-120v5,-22,1,-44,-24,-44v-27,0,-36,20,-39,44r63,0xm95,-85v-20,11,-18,47,11,47v11,0,19,-2,27,-5r9,-48v-17,0,-37,0,-47,6","w":317},"\u00f8":{"d":"216,-218v9,1,33,-3,24,7r-31,34v25,80,-7,180,-104,180v-19,0,-35,-5,-48,-14v-12,12,-20,29,-49,24v-4,0,-2,-6,0,-7r32,-36v-26,-79,7,-179,103,-179v20,0,36,5,49,14v8,-7,13,-19,24,-23xm153,-153v-43,-23,-64,26,-64,71xm160,-124r-65,72v44,23,64,-27,65,-72","w":212},"\u00bf":{"d":"164,-206v4,0,7,1,6,6v-6,17,0,46,-16,53r-43,0v-4,0,-6,-2,-6,-7r8,-46v7,-12,34,-4,51,-6xm89,-14v-7,9,-11,30,10,30v13,0,32,-1,53,-4v12,8,-1,33,-3,46v-50,21,-153,17,-131,-59v16,-53,69,-65,84,-117v4,-13,30,-5,46,-7v19,44,-40,82,-59,111","w":172,"k":{"Y":31,"V":21}},"\u00a1":{"d":"56,-199v7,-12,49,-10,57,-2r-9,47v-4,14,-34,4,-50,7v-5,0,-6,-2,-6,-7xm47,-117v3,-12,47,-14,45,0r-24,180v-6,14,-36,4,-54,7v-3,-1,-6,-3,-6,-7","w":98,"k":{"Y":20,"V":4}},"\u00ac":{"d":"223,-71v-5,12,-44,11,-44,0r0,-94r-114,0v-14,-1,-4,-26,-7,-38v0,-4,2,-6,7,-6r151,0v5,0,7,2,7,6r0,132"},"\u00ab":{"d":"248,-30v2,3,0,8,-5,7v-16,-2,-40,4,-49,-4v-16,-26,-37,-47,-49,-77v17,-32,49,-49,72,-75v13,-7,47,-6,63,-1v-24,29,-56,50,-82,77xm136,-30v2,3,0,8,-5,7v-16,-2,-40,4,-49,-4v-16,-26,-37,-47,-49,-77v17,-32,49,-49,72,-75v13,-7,47,-6,63,-1v-24,29,-56,50,-82,77","w":258},"\u00bb":{"d":"164,-176v-1,-13,42,-9,54,-3v16,26,37,48,50,77v-17,32,-49,49,-72,75v-14,7,-48,6,-64,1v24,-29,56,-50,83,-77xm52,-176v0,-4,0,-8,5,-7v16,2,40,-4,50,4v16,26,36,48,49,77v-17,32,-49,49,-72,75v-14,7,-48,6,-64,1v24,-29,56,-50,83,-77","w":258},"\u00a0":{},"\u00c0":{"d":"179,0v-4,0,-7,-3,-7,-7r-2,-59r-74,0r-23,59v-8,15,-40,4,-60,7v-5,1,-6,-4,-4,-8r93,-223v11,-40,65,-49,103,-32v9,4,15,16,16,32r14,224v-6,15,-38,4,-56,7xm168,-115r-4,-99v0,-8,-8,-8,-9,0r-40,99r53,0xm205,-292v2,3,1,6,-3,6v-14,-2,-37,5,-44,-4v-12,-16,-27,-29,-37,-47v14,-3,48,-5,58,3","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"G":7,"C":7}},"\u00c3":{"d":"136,-292v-5,14,-48,10,-35,-6v-1,-47,62,-56,89,-26v12,12,24,7,24,-10v2,-11,21,-4,32,-6v7,-1,5,8,4,13v2,49,-65,54,-90,25v-10,-12,-24,-5,-24,10xm179,0v-4,0,-7,-3,-7,-7r-2,-59r-74,0r-23,59v-8,15,-40,4,-60,7v-5,1,-6,-4,-4,-8r93,-223v11,-40,65,-49,103,-32v9,4,15,16,16,32r14,224v-6,15,-38,4,-56,7xm168,-115r-4,-99v0,-8,-8,-8,-9,0r-40,99r53,0","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"G":7,"C":7}},"\u00d5":{"d":"222,-334v6,-12,45,-10,35,7v1,49,-63,54,-89,25v-10,-12,-26,-6,-25,10v-2,11,-21,4,-32,6v-17,-30,34,-78,73,-48v10,8,37,30,38,0xm64,-210v34,-79,206,-87,198,27v-8,99,-28,186,-137,186v-111,0,-93,-139,-61,-213xm109,-155v-7,39,-28,107,26,104v58,-3,58,-73,65,-128v6,-49,-66,-47,-80,-12v-4,10,-8,21,-11,36","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"\u00f7":{"d":"119,-246v17,3,47,-7,50,7v-2,16,7,44,-7,47v-16,-3,-45,7,-50,-7v2,-16,-7,-44,7,-47xm216,-163v13,2,5,25,7,38v0,4,-2,6,-7,6r-151,0v-14,-1,-4,-26,-7,-38v0,-4,3,-6,7,-6r151,0xm119,-85v16,3,45,-7,50,7v-3,15,7,43,-7,47v-16,-3,-44,7,-50,-6v3,-16,-7,-44,7,-48"},"\u00ff":{"d":"235,-206v5,-1,5,3,5,8r-113,240v-14,32,-92,43,-123,18v5,-12,-1,-34,14,-36v32,6,78,5,75,-26v-21,0,-28,-12,-31,-34r-19,-163v0,-5,2,-7,8,-7r47,0v3,0,6,1,6,6r8,138v-1,5,3,5,7,5r59,-143v9,-14,38,-3,57,-6xm171,-270v5,-14,48,-13,49,0v-5,13,0,37,-15,40v-13,-3,-38,7,-40,-7xm136,-237v-6,12,-47,12,-49,0v5,-14,0,-38,15,-41v13,3,39,-8,40,8","w":213,"k":{"\u00e6":9,"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e7":10,"\u00e5":9,"\u00e3":9,"\u00e4":9,"\u00e2":9,"\u00e0":9,"\u00e1":9,"o":8,"e":7,"c":10,"a":9}},"\u20ac":{"d":"198,-271v23,0,52,-2,58,15v-6,13,0,39,-16,42v-48,-5,-91,-8,-103,38r76,0v13,2,-1,16,-2,23v-13,18,-55,3,-81,8r-4,22v21,2,61,-6,70,5v-5,8,-4,22,-15,25r-59,0v-7,54,48,43,91,40v13,3,-2,29,-1,42v-9,15,-34,14,-60,14v-57,0,-94,-34,-92,-96v-9,-1,-22,4,-21,-7v2,-14,3,-27,24,-23r4,-22v-8,-1,-20,3,-18,-8v2,-14,3,-27,24,-23v13,-63,58,-95,125,-95"},"\u00c2":{"d":"241,-292v2,2,1,6,-2,6v-15,-2,-36,5,-44,-5r-18,-25v-12,10,-21,24,-37,30v-14,-1,-32,3,-42,-2v17,-17,30,-42,53,-52v21,3,53,-6,66,5xm179,0v-4,0,-7,-3,-7,-7r-2,-59r-74,0r-23,59v-8,15,-40,4,-60,7v-5,1,-6,-4,-4,-8r93,-223v11,-40,65,-49,103,-32v9,4,15,16,16,32r14,224v-6,15,-38,4,-56,7xm168,-115r-4,-99v0,-8,-8,-8,-9,0r-40,99r53,0","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"G":7,"C":7}},"\u00ca":{"d":"233,-292v3,2,0,6,-3,6v-14,-2,-36,5,-43,-5r-18,-25v-12,10,-21,24,-37,30v-14,-1,-32,3,-42,-2v17,-17,30,-42,53,-52v21,3,53,-6,66,5xm72,-235v18,-42,120,-45,163,-25v-7,12,0,39,-15,42v-36,7,-95,-17,-100,24r-6,33r93,0v14,5,-1,29,0,41v0,5,-5,8,-9,8r-93,0v0,22,-23,62,12,62r73,0v14,5,-1,29,0,41v-1,4,-3,7,-8,8v-69,10,-163,9,-145,-73v12,-52,17,-118,35,-161","w":209},"\u00c1":{"d":"179,0v-4,0,-7,-3,-7,-7r-2,-59r-74,0r-23,59v-8,15,-40,4,-60,7v-5,1,-6,-4,-4,-8r93,-223v11,-40,65,-49,103,-32v9,4,15,16,16,32r14,224v-6,15,-38,4,-56,7xm168,-115r-4,-99v0,-8,-8,-8,-9,0r-40,99r53,0xm244,-339v5,0,5,3,2,5v-21,15,-37,37,-62,48v-15,-1,-34,3,-45,-2v17,-17,32,-39,54,-51r51,0","w":240,"k":{"\u00fd":17,"\u00dd":27,"\u00d9":7,"\u00db":7,"\u00da":7,"\u00d2":7,"\u00d4":7,"\u00d3":7,"\u00ff":17,"\u00d5":7,"\u00d8":7,"\u00dc":7,"\u00d6":7,"\u00c7":7,"y":17,"w":10,"v":17,"t":12,"f":12,"Y":27,"W":10,"V":20,"U":7,"T":25,"Q":7,"O":7,"G":7,"C":7}},"\u00cb":{"d":"72,-235v18,-42,120,-45,163,-25v-7,12,0,39,-15,42v-36,7,-95,-17,-100,24r-6,33r93,0v14,5,-1,29,0,41v0,5,-5,8,-9,8r-93,0v0,22,-23,62,12,62r73,0v14,5,-1,29,0,41v-1,4,-3,7,-8,8v-69,10,-163,9,-145,-73v12,-52,17,-118,35,-161xm178,-329v5,-14,48,-13,49,0v-5,13,0,37,-15,40v-13,-3,-38,7,-40,-7xm143,-296v-6,12,-47,12,-49,0v5,-14,0,-38,15,-41v13,3,39,-8,40,8","w":209},"\u00c8":{"d":"72,-235v18,-42,120,-45,163,-25v-7,12,0,39,-15,42v-36,7,-95,-17,-100,24r-6,33r93,0v14,5,-1,29,0,41v0,5,-5,8,-9,8r-93,0v0,22,-23,62,12,62r73,0v14,5,-1,29,0,41v-1,4,-3,7,-8,8v-69,10,-163,9,-145,-73v12,-52,17,-118,35,-161xm191,-292v2,3,1,6,-3,6v-14,-2,-37,5,-44,-4v-12,-16,-27,-29,-37,-47v14,-3,48,-5,58,3","w":209},"\u00cd":{"d":"88,-7v-6,14,-38,4,-56,7v-4,0,-5,-2,-5,-7r44,-254v7,-15,38,-3,56,-7v4,0,6,2,6,7xm175,-339v5,0,5,3,2,5v-21,15,-37,37,-62,48v-15,-1,-34,3,-45,-2v17,-17,32,-39,54,-51r51,0","w":111},"\u00ce":{"d":"178,-292v2,3,0,6,-3,6v-14,-2,-36,5,-43,-4r-18,-25v-12,9,-21,24,-37,29v-14,-1,-32,3,-42,-2v15,-18,31,-39,52,-51v22,3,54,-6,67,5xm88,-7v-6,14,-38,4,-56,7v-4,0,-5,-2,-5,-7r44,-254v7,-15,38,-3,56,-7v4,0,6,2,6,7","w":111},"\u00cf":{"d":"88,-7v-6,14,-38,4,-56,7v-4,0,-5,-2,-5,-7r44,-254v7,-15,38,-3,56,-7v4,0,6,2,6,7xm128,-329v5,-14,48,-13,49,0v-5,13,0,37,-15,40v-13,-3,-38,7,-40,-7xm93,-296v-6,12,-47,12,-49,0v5,-14,0,-38,15,-41v13,3,39,-8,40,8","w":111},"\u00cc":{"d":"88,-7v-6,14,-38,4,-56,7v-4,0,-5,-2,-5,-7r44,-254v7,-15,38,-3,56,-7v4,0,6,2,6,7xm141,-292v2,3,1,6,-3,6v-14,-2,-37,5,-44,-4v-12,-16,-27,-29,-37,-47v14,-3,48,-5,58,3","w":111},"\u00d3":{"d":"64,-210v34,-79,206,-87,198,27v-8,99,-28,186,-137,186v-111,0,-93,-139,-61,-213xm109,-155v-7,39,-28,107,26,104v58,-3,58,-73,65,-128v6,-49,-66,-47,-80,-12v-4,10,-8,21,-11,36xm243,-339v5,0,5,3,2,5v-21,15,-37,37,-62,48v-15,-1,-34,3,-45,-2v17,-17,32,-39,54,-51r51,0","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"\u00d4":{"d":"246,-292v3,2,0,6,-3,6v-14,-2,-36,5,-43,-5r-18,-25v-12,9,-22,24,-37,30v-14,-1,-32,3,-42,-2v15,-18,30,-40,52,-52v22,3,54,-6,67,5xm64,-210v34,-79,206,-87,198,27v-8,99,-28,186,-137,186v-111,0,-93,-139,-61,-213xm109,-155v-7,39,-28,107,26,104v58,-3,58,-73,65,-128v6,-49,-66,-47,-80,-12v-4,10,-8,21,-11,36","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"\u00d2":{"d":"64,-210v34,-79,206,-87,198,27v-8,99,-28,186,-137,186v-111,0,-93,-139,-61,-213xm109,-155v-7,39,-28,107,26,104v58,-3,58,-73,65,-128v6,-49,-66,-47,-80,-12v-4,10,-8,21,-11,36xm207,-292v2,3,1,6,-3,6v-14,-2,-37,5,-44,-4v-12,-16,-27,-29,-37,-47v14,-3,48,-5,58,3","w":251,"k":{"\u00dd":16,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"Z":10,"Y":16,"X":18,"W":4,"V":9,"T":11,"A":7}},"\u00da":{"d":"225,-268v17,3,47,-8,53,7v-30,108,-2,264,-151,264v-63,0,-96,-38,-85,-103r28,-161v6,-14,38,-4,56,-7v4,1,6,3,6,7r-31,182v-4,43,68,38,78,9v20,-56,24,-129,37,-191v0,-4,5,-7,9,-7xm250,-339v5,0,5,3,2,5v-21,15,-37,37,-62,48v-15,-1,-34,3,-45,-2v17,-17,32,-39,54,-51r51,0","w":255,"k":{"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"A":7}},"\u00db":{"d":"251,-292v3,2,0,6,-3,6v-14,-2,-36,5,-43,-5r-18,-25v-12,9,-22,24,-37,30v-14,-1,-32,3,-42,-2v15,-18,30,-40,52,-52v22,3,54,-6,67,5xm225,-268v17,3,47,-8,53,7v-30,108,-2,264,-151,264v-63,0,-96,-38,-85,-103r28,-161v6,-14,38,-4,56,-7v4,1,6,3,6,7r-31,182v-4,43,68,38,78,9v20,-56,24,-129,37,-191v0,-4,5,-7,9,-7","w":255,"k":{"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"A":7}},"\u00d9":{"d":"225,-268v17,3,47,-8,53,7v-30,108,-2,264,-151,264v-63,0,-96,-38,-85,-103r28,-161v6,-14,38,-4,56,-7v4,1,6,3,6,7r-31,182v-4,43,68,38,78,9v20,-56,24,-129,37,-191v0,-4,5,-7,9,-7xm215,-292v2,3,1,6,-3,6v-14,-2,-37,5,-44,-4v-12,-16,-27,-29,-37,-47v14,-3,48,-5,58,3","w":255,"k":{"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c0":7,"\u00c5":7,"\u00c4":7,"A":7}},"\u00b8":{"d":"111,13v4,0,3,3,1,5v-21,16,-37,36,-61,48v-14,-1,-32,3,-42,-2v17,-17,31,-40,54,-51r48,0","w":153},"\u00a6":{"d":"54,-262v17,3,46,-7,51,7r0,124v-3,16,-35,5,-51,8v-4,1,-9,-4,-8,-8r0,-124v0,-5,3,-7,8,-7xm54,-63v17,3,46,-7,51,7r0,124v-3,16,-35,5,-51,8v-4,1,-9,-4,-8,-8r0,-124v0,-5,3,-7,8,-7","w":104},"\u00d0":{"d":"74,-262v88,-25,202,-7,181,105v-17,91,-36,160,-143,160v-30,0,-55,-1,-76,-5v-8,-1,-11,-7,-8,-13r17,-97v-10,-2,-28,5,-26,-7v3,-21,-1,-50,35,-42v7,-33,9,-71,20,-101xm172,-73v17,-42,52,-150,-21,-145r-26,0r-10,57v10,2,29,-6,28,7v-5,21,0,50,-36,42r-12,62v32,3,66,2,77,-23","w":245},"\u00f0":{"d":"163,-253v79,33,67,216,-5,246v-69,29,-146,-8,-125,-97v14,-59,54,-111,127,-93v-9,-12,-21,-22,-36,-30r-35,23v-5,-4,-18,-17,-7,-22r16,-12v-6,-4,-23,-3,-20,-12v7,-8,9,-30,21,-28v12,2,26,7,40,13v15,-9,39,-36,50,-9v-5,9,-18,14,-26,21xm100,-133v-8,25,-29,87,14,87v38,0,39,-40,43,-79v4,-37,-49,-32,-57,-8","w":212},"\u00dd":{"d":"137,-160v0,7,10,7,11,0r57,-101v9,-15,42,-4,62,-7v4,0,7,5,4,8r-77,125v-9,15,-18,24,-28,28r-17,100v-6,14,-38,4,-56,7v-4,0,-6,-2,-6,-7r18,-100v-10,-6,-15,-14,-19,-28r-33,-126v7,-15,40,-4,58,-7v3,0,5,3,6,7xm241,-339v5,0,5,3,2,5v-21,15,-37,37,-62,48v-15,-1,-34,3,-45,-2v17,-17,32,-39,54,-51r51,0","w":233,"k":{"\u00fd":15,"\u00d2":16,"\u00d4":16,"\u00d3":16,"\u00c8":13,"\u00cb":13,"\u00c1":27,"\u00ca":13,"\u00c2":27,"\u00ff":15,"\u00d5":16,"\u00c3":27,"\u00c0":27,"\u00e6":32,"\u00d8":16,"\u00c6":27,"\u00fc":24,"\u00fb":24,"\u00f9":24,"\u00fa":24,"\u00f5":35,"\u00f6":35,"\u00f4":35,"\u00f2":35,"\u00f3":35,"\u00eb":34,"\u00ea":34,"\u00e8":34,"\u00e9":34,"\u00e5":32,"\u00e3":32,"\u00e4":32,"\u00e2":32,"\u00e0":32,"\u00e1":32,"\u00d6":16,"\u00c9":13,"\u00c7":18,"\u00c5":27,"\u00c4":27,"y":15,"v":17,"u":24,"o":35,"e":34,"a":32,"Q":16,"O":16,"E":13,"C":18,"A":27}},"\u00fd":{"d":"235,-206v5,-1,5,3,5,8r-113,240v-14,32,-92,43,-123,18v5,-12,-1,-34,14,-36v32,6,78,5,75,-26v-21,0,-28,-12,-31,-34r-19,-163v0,-5,2,-7,8,-7r47,0v3,0,6,1,6,6r8,138v-1,5,3,5,7,5r59,-143v9,-14,38,-3,57,-6xm223,-280v5,0,5,3,2,5v-21,15,-37,37,-62,48v-15,-1,-34,3,-45,-2v17,-17,32,-39,54,-51r51,0","w":213,"k":{"\u00e6":9,"\u00f5":8,"\u00f6":8,"\u00f4":8,"\u00f2":8,"\u00f3":8,"\u00eb":7,"\u00ea":7,"\u00e8":7,"\u00e9":7,"\u00e7":10,"\u00e5":9,"\u00e3":9,"\u00e4":9,"\u00e2":9,"\u00e0":9,"\u00e1":9,"o":8,"e":7,"c":10,"a":9}},"\u00de":{"d":"128,-239v60,-4,124,8,123,69v0,86,-64,115,-154,108r-10,55v-6,14,-37,4,-55,7v-4,0,-6,-2,-6,-7r45,-254v7,-15,37,-3,55,-7v12,2,2,23,2,29xm105,-113v46,2,83,-3,83,-48v0,-31,-37,-27,-69,-27","w":234},"\u00fe":{"d":"117,-207v79,-16,118,35,99,117v-15,66,-56,105,-136,90r-11,63v-5,14,-35,4,-52,7v-4,0,-7,-2,-7,-7r59,-332v6,-14,36,-4,53,-7v4,0,5,3,5,7xm157,-90v3,-27,19,-73,-19,-71v-9,0,-19,1,-30,2r-20,112v41,7,65,-4,69,-43","w":214},"\u00d7":{"d":"213,-98v7,16,-16,24,-25,34v-20,-12,-32,-32,-49,-46v-17,15,-30,34,-49,46v-8,-10,-31,-20,-25,-34r43,-43v-15,-16,-33,-30,-46,-48v7,-12,18,-20,28,-29v20,12,32,32,49,46v17,-15,30,-34,49,-46v11,7,19,18,28,28v-12,20,-32,32,-46,49"},"\u00b9":{"d":"58,-249v14,-12,48,-27,67,-15r-24,140v-4,7,-32,6,-38,0r19,-107v-9,2,-22,14,-29,8","w":116},"\u00b2":{"d":"61,-260v24,-17,95,-18,94,22v-2,50,-62,49,-79,85r58,0v9,3,-1,20,0,28v0,3,-2,5,-6,5r-88,0v-14,-49,41,-83,75,-104v6,-11,-2,-18,-17,-16v-13,-1,-33,7,-40,-2","w":127},"\u00b3":{"d":"60,-260v25,-18,96,-17,95,22v0,18,-8,31,-24,41v36,39,-15,93,-74,75v-22,3,-25,-24,-11,-31v25,-2,64,11,61,-20v-1,-16,-32,-6,-48,-9v-8,-3,-4,-28,6,-29v22,-1,53,6,52,-18v-6,-18,-31,-7,-56,-8v-9,-3,0,-16,-1,-23","w":126},"\u00bd":{"d":"206,-137v27,-19,94,-19,94,21v0,50,-62,48,-79,84r58,0v8,4,3,30,-6,32r-88,0v-14,-49,40,-81,74,-102v7,-10,0,-16,-16,-16v-12,0,-24,1,-36,3v-8,-2,-1,-15,-1,-22xm277,-268v5,0,3,5,1,8r-200,260v-12,1,-36,4,-45,-2r202,-264v10,-5,29,-1,42,-2xm82,-231v-9,2,-22,13,-29,8v3,-10,1,-24,8,-30v17,-5,43,-25,64,-11r-24,140v-4,7,-32,6,-38,0","w":293},"\u00bc":{"d":"261,-32v-4,10,0,28,-11,32v-10,-2,-29,6,-31,-5r5,-27v-18,-2,-46,5,-57,-4v3,-10,1,-23,7,-29v26,-27,49,-59,79,-82v10,2,29,-5,27,7r-14,79v18,-4,15,11,11,24v0,6,-9,5,-16,5xm277,-268v5,0,3,5,1,8r-200,260v-12,1,-36,4,-45,-2r202,-264v10,-5,29,-1,42,-2xm58,-249v14,-12,48,-27,67,-15r-24,140v-4,7,-32,6,-38,0r19,-107v-9,2,-22,14,-29,8xm230,-61r6,-37v-12,11,-24,22,-33,36v7,2,18,0,27,1","w":284},"\u00be":{"d":"273,-145v9,-3,34,-6,32,5r-14,79v6,1,15,-2,15,4v-4,12,1,29,-20,25v-4,10,0,28,-11,32v-10,-2,-29,6,-31,-5r5,-27v-18,-3,-46,6,-57,-4v3,-10,1,-23,8,-29xm302,-268v4,0,4,5,1,8r-195,254v-7,12,-30,3,-46,6v-5,0,-3,-6,-1,-8r199,-258v10,-5,29,-1,42,-2xm60,-260v25,-18,96,-17,95,22v0,18,-8,31,-24,41v36,39,-15,93,-74,75v-22,3,-25,-24,-11,-31v25,-2,64,11,61,-20v-1,-16,-32,-6,-48,-9v-8,-3,-4,-28,6,-29v22,-1,53,6,52,-18v-6,-18,-31,-7,-56,-8v-9,-3,0,-16,-1,-23xm255,-61r7,-41v-14,12,-25,26,-37,40v8,3,21,0,30,1","w":309},"\u00ad":{"d":"29,-95v4,-13,0,-32,13,-35r70,0v13,3,1,24,1,34v0,4,-4,6,-8,6r-70,0v-4,0,-6,-1,-6,-5","w":108},"\u00af":{"d":"242,-310v12,1,3,19,3,23v-1,4,-3,6,-8,6r-204,0v-12,-1,-3,-19,-3,-23v1,-4,3,-6,8,-6r204,0","w":194},"\u00b7":{"d":"49,-160v7,-12,53,-12,57,0v-6,17,-1,45,-16,52r-43,0v-5,0,-6,-3,-6,-7","w":98},"\u00a4":{"d":"208,-227v9,9,30,18,24,32r-31,30v12,20,12,45,0,64v11,12,24,21,33,35v-8,9,-19,30,-32,24r-31,-31v-17,10,-42,9,-60,0v-14,9,-23,33,-41,31v-6,-9,-27,-17,-19,-30r30,-30v-11,-18,-11,-43,-1,-61v-9,-13,-33,-24,-31,-40v10,-6,16,-28,30,-20r30,30v18,-12,44,-12,63,-1v12,-11,22,-24,36,-33xm142,-104v16,0,30,-15,30,-31v0,-16,-14,-31,-30,-30v-18,0,-29,13,-30,30v-1,16,14,31,30,31"}}});
/**
 *  20-prv.config.js
 * =========================================
 * @requieres: 	--
 * @revision: 	1.0
 */

/**
 * CFG - Common
 * =========================================
 * @modified: 	Marcos (23-06-11)
 */
 
var CFG = {
	core_ver: 			'3.0 alpha',// version del CORE
	release_ver: 		1.13,		// version de la web
	
	nSegTimeout:		15,			// segundos que espera en recibir respuesta antes de retornar error 408
	
	get: function (key) {
		var value = '';
		if(key  !== '') {
			eval('this.' + key);
		}
		return value;
	}
};/**
 *  22-prv.core.js
 * =========================================
 * @requieres: 	--
 * @revision: 	1.1
 */

/**
 * PRV - Privalia Core
 * =========================================
 * @modified: 	Marcos (28-06-11)
 */

var PRV = {
	nVersion: 			CFG.get('core_ver'),
	nReleaseVersion: 	CFG.get('release_ver')
};

PRV.Core = {
	// configurable
	nCoreVersion:		1.0,
	bDebug:				true,
	sIdLoadTarget: 		'page',			// por defecto, el target para mostrar la carga es la pantalla completa
	bShowLoad:			true,
	
	// interno
	oExecution:			null,
	bLoading:			false,
	nSegExecution:		0,				// segundos que tarda una peticion IO desde que se emite hasta que termina de procesar la respuesta
	
	header: function (status) {
		switch(status) {
			// Mensaje mostrado cuando el usuario ha solicitado datos que son inconsistentes (un producto que no pertenece a una campana, intenta editar una direccion que no es suya...)
			// por defecto mostrar pagina error 400. Se puede cambiar el redirect 400 usando "onHeader400()"
			case 400:
				this.load();
				document.location.href = this.url_400;
				break;
				
			case 408:
				this.load();
				document.location.href = this.url_408;
				break;
				
			case 500:
				this.load();
				document.location.href = this.url_500;
				break;
				
			default:
				if (this.debug) {
					//console.log('header response', status);
				}
		}
		this.stopLoad();
	},
	
	/**
	 * Modo de carga. Mostrar el icono de cargando
	 * por defecto, el target es toda la pagina
	 */
	load: function (target) {
		if(this.bShowLoad) {
			if(!Object.isUndefined(target)) {
				this.sIdLoadTarget = target;
			}
			
			if(!this.bLoading) {
				// TODO: mike - hay que investigar porque esto en IE6-7 peta
				if(!Prototype.Browser.IE) {
					$(this.sIdLoadTarget).startWaiting();	// protoload
				}
				this.bLoading = true;
			}
		}
	},
	
	/**
	 * Inicia a contar el tiempo de una peticion IO
	 */
	startTimeExecution: function () {
		this.nSegExecution = 0;
		this.oExecution = window.setInterval((function() {
			this.nSegExecution++;
		}).bind(this), 1);
	},
	
	/**
	 * Terminar la carga de la pagina
	 */
	stopLoad: function() {
		if(this.bLoading) {
			$(this.sIdLoadTarget).stopWaiting();
			this.bLoading = false;
		}
	},
	
	/**
	 * Detener el contador de tiempo de una peticion IO
	 * El tiempo resultante se guarda en nSegExecution
	 */
	stopTimeExecution: function () {
		window.clearInterval(this.oExecution);
	}
};

PRV.Core.IO = new Class.create(PRV.Core, {
	initialize: function () {
		
		this.error =				false;
		this.bDebug = 				true;
		this.i_segTimeout =			15;					// segundos que espera en recibir respuesta antes de retornar error 408
		this.bTimeout =				false;				// Activar timeout 408
		this.o_timeout =			null;				// elemento timeout
		
		this.res_data =				'';
		this.res_textcodes =		'';
		this.res_status =			'';
		this.res_webanalytics =		'';
	},
	
	
	call: function (sUrl, fCallback, sParams) {
		if(sUrl !== '') {
			this.startTimeout();
			
			if(arguments.length === 1 || (typeof fCallback !== "function")) {
				var fCallback = this.endCall.bind(this);
			}
			
			var ajaxOptions = {
				onFailure: (function(response) {
					//this._showJson();
					this.header(response.status);
				}).bind(this),
	
				onException: (function(response, error) {
					if(this.bDebug) {
						this.stopLoad();
						//this._showJson();
						if(typeof(DGuardian) != 'undefined') {
							DGuardian.log('PRV.IO.call@' + error);
						}
					}
				}).bind(this),
				
				onComplete: fCallback
			};
			
			// enviar parametros a la llamada ajax
			if(arguments.length === 3 && sParams !== '') {
				ajaxOptions.parameters = sParams;
			}
			
			new Ajax.Request(sUrl, ajaxOptions);
		}
	},
	
	endCall: function (response) {
		// detener contador de respuesta
		this.stopTimeout();
		this.parseResponse(response);
	},
	
	/**
	 * Devuelve contenido del Response ajax > data
	 */
	getResData: function() {
		return this.res_data;
	},

	/**
	 * Devuelve contenido del Response ajax > status
	 */
	getResStatus: function() {
		return this.res_status;
	},

	/**
	 * Devuelve contenido del Response ajax > textcodes
	 */
	getResTextcodes: function() {
		return this.res_textcodes.code;
	},

	/**
	 * Devuelve contenido del Response ajax > webanalytics
	 */
	getResWebanalytics : function() {
		return this.res_webanalytics;
	},
	
	/**
	 * Comprueba el textcode. Si devuelve un codigo 403 es que no esta logeado
	 */
	isLogged: function () {
		var code = this.getResTextcodes();
		var codeNotLogged = "msg0100403"; // codigo error no logeado
		var loggedIn = true;

		if(code == codeNotLogged) {
			loggedIn = false;
		}
		return loggedIn;
	},
	
	/**
	 * Recogemos las respuesta formateada y lo guardamos en el objeto
	 */
	parseResponse: function(response) {
		var Res = new Hash(response.responseText.evalJSON());

		this.res_data =			Res.get("data");
		this.res_status =		Res.get("status");
		this.res_textcodes =	Res.get("textcodes");
		this.res_webanalytics = Res.get("webanalytics");
	},
	
	/**
	 * Inicia el timeout de respuesta. Si transcurridos X segundos no recibe respuesta, devolvera un error 408
	 */
	startTimeout: function () {
		if(this.bTimeout) {
			var nSeconds = CFG.get('nSegTimeout');
			this.o_timeout = window.setTimeout((function() {
				this.header(408);
			}).bind(this), nSeconds * 1000);
		}
	},
	
	/**
	 * El response del AJAX nos devuelve en el campo "status" un "success" o "error"
	 */
	statusOK: function() {
		return (this.getResStatus() == "success");
	},

	/**
	 * Cancelar el timeout de respuesta, para impedir que devuelva error 408
	 */
	stopTimeout: function () {
		if(this.bTimeout) {
			window.clearTimeout(this.o_timeout);
		}
	}
});

PRV.Core.Error = new Class.create(PRV.Core, {
	initialize: function () {
		
		this.bDebug = false;
	}
});

PRV.Core.Loader = new Class.create(PRV.Core.IO, {
	initialize: function ($super) {
		$super();
		
		// configurable
		this.bDebug = 				true;
		this.s_section = 			'';				
		this.duration_hide =		0.2;				// segundos que dura la transicion para ocultar un elemento
		this.duration_show =		0.3;				// segundos que dura la transicion para mostrar un elemento
		
		// interno
		this.build =				'';
		this.built =				'';
		this.cssJson =				'json';
		this.cssJsoned =			'jsoned';
		this.idProcess =			'';
		this.reloadData =			true;				// actualizar datos tras un submit
		this.s_urlGetData = 		'';					// guardamos URL del getData para temas de actualizacion reload()
		this.v_data =				[];
		this.i_numTargets =			0;
		this.b_reloading =			false;
		this.target =				'';
		this.tpl = 					'';
	},
	
	/**
	 * Vuelco los datos al HTML
	 * Guardo en "built" el html generado con los datos acumulado
	 */
	addBuilt: function (dataJson) {
		this.built += this.tpl.evaluate(dataJson);
	},
	
	/**
	 * Construye la pagina con los datos pasados por json previamente
	 */
	buildPage: function(generate) {
		switch(generate) {
			case 'generic': default:
				this.generateHtml();
		}
	},
	
	/**
	 * Obtiene el fragmento de tpl a replicar y vuelca los datos en JSON
	 * Recorre todos los objects
	 * 
	 * options:
	 * 		pushData: FOO --> funcion que queremos aplicar para cada item de cada objeto
	 * 		mode: 'push' / 'add' --> 'push' (volcar sustituyendo) o 'add' (volcar agregando debajo)
	 */
	generateHtml: function(options) {
		var html = '';

		// reseteamos contenido volcado
		this._resetBuilt();

		if(this.i_numTargets > 0) {

			// por defecto la funcion PUSH es "pushBasic"
			var options = Object.extend({
				pushData: this.pushBasic,
				mode: 'push'				// puede ser 'push' (volcar sustituyendo) o 'add' (volcar agregando debajo)
		    }, arguments[0] || { });

			this.v_data.each(function(oData) {
				var target = 	oData.target,
				html =		oData.html,
				vDataToPush = [];
				
				if(!html.empty()) {
					this.setTarget(target);

					var tpl = new Template(html);
					this.setTpl(tpl);

					// compruebo si los datos esta en un array de objetos
					if(Object.isArray(oData.json)) {
						vDataToPush = oData.json;
					}
					// no es un array, es un objeto, lo vuelco directamente a la tpl
					else {
						vDataToPush = [oData.json]; // metemos el objeto en un array
					}

					// Para cada objeto de datos, asigno valores a las variables JS
					vDataToPush.each(options.pushData.bind(this));

					// vuelco al div los datos montados
					this._pushBuilt(options.mode);

					// reseteamos contenido volcado
					this._resetBuilt();
				}
				html = '';

			}, this);
		}
	},
	
	getBuilt: function () {
		return this.built;
	},
	
	getData: function (urlDataAjax, section) {
		this.startTimeExecution();
		
		if(this.bDebug) {
			console.log('getData', urlDataAjax);
		}
		
		var DGuardianOn = (typeof(DGuardian) != 'undefined'); 	// existe el objeto DGuardian
		var s_idProcess = 'getdata_' + urlDataAjax;			// definimos un id para este proceso del getData. necesario para DarkGuardian
		this.setIdProcess(s_idProcess);

		if(DGuardianOn) {
			// damos de alta este proceso al DarkGuardian, para que lo vigile
			DGuardian.setProcess(s_idProcess);
		}
		
		if(urlDataAjax != "") {
			// tipo de getData personalizado
			this._setBuild(section);
			
			// ocultamos divs a volcar
			//this._preinit();
			this.load();
			
			// guardamos URL del getData para temas de actualizacion reload()
			this.setUrlGetData(urlDataAjax);

			// iniciar contador de respuesta
			this.startTimeout();
			
			this.preGetData();
			
			// obtenemos los datos (ajax)
			this._callData(urlDataAjax);
			
			if(DGuardianOn) {
				DGuardian.progress(5, s_idProcess);
			}
		}
	},
	
	/**
	 * Obtener id del proceso del getData
	 */
	getIdProcess: function() {
		return this.idProcess;
	},
	
	getSection: function () {
		return this.s_section;
	},
	
	getTarget: function () {
		return this.target;
	},
	
	postGetData: function () {
		
	},
	
	preGetData: function () {
		
	},
	
	/**
	 * Antes de volcar los datos al HTML, trato los datos
	 * En el caso basico no se tratan los datos, por tanto directamente se vuelca
	 */
	pushBasic: function (dataJson) {
		this.addBuilt(dataJson);
	},
	
	/**
	 * Actualiza/recarga los datos. Vuelve hacer un getData y vuelve a volcar los datos
	 * en los mismos bloques.
	 */
	reload: function () {

		if(this.reloadData) {
			var url = this.s_urlGetData;

			this.i_numTargets = 0;
			this.b_reloading = true;
			this.getData(url, this.build);
		}
	},
	
	setCssJson: function (style) {
		this.cssJson = style;
	},
	
	/**
	 * Los campos que sean tipo radio, select, checkbox, etc., hay que tratarlo de forma especial
	 * para saber que valor por defecto marcar o seleccionar.
	 */
	setExtraInputs: function() {
		// radiobuttones
		$$('.'+ this.cssJson + '_radio').each(function(item){
			var key = $(item).identify();
			var value = $F(item);
			if(value != '') {
				$(key + '_' + value).checked = true;
			}
		},this);

		// select
		$$('.'+ this.cssJson + '_select').each(function(item){
			var key = $(item).identify(),
			value = $F(item),
			valor = '';
			if(value != '') {
				if($(key).title != '') {
					// casos especiales:
					// - select de dia, hay que quitar el cero
					if(key == 'member_birthday') {
						valor = $(key).title;
						if(valor.substring(0,1) == '0') {
							$(key).value = valor.substring(1);
						}
						else {
							$(key).value = $(key).title;
						}
					}
					else {
						$(key).value = $(key).title;
					}
				}
			}
		},this);

		// checkboxes
	},

	/**
	 * Solucion para las imagenes que tenemos que cargar dinamicamente el SRC.
	 * hay que colocar la variable del path en el atributo "title", y etiquetar la img con class="json_img"
	 * Esta funcion rastreara estas imagenes y copiara el contenido del title y lo escribira al src
	 * Ejemplo:
	 * 		<img src="{$sys_url_img}pix-trans.gif" title="#{variable_js}" class="json_img" />
	 */
	setExtraImg: function() {
		// imagenes
		$$('.'+ this.cssJson + '_img').each(function(item){
			pathImg = $(item).title;
			if(pathImg != '') {
				$(item).src = pathImg;
				$(item).title = '';
			}
		},this);
	},
	/**
	 * Solucion para los enlaces que tenemos que cargar dinamicamente el HREF.
	 * hay que colocar la variable del enlace en el atributo "title", y etiquetar el <a> con class="json_link"
	 * Esta funcion rastreara estos enlaces y copiara el contenido del title y lo escribira al href
	 * Ejemplo:
	 * 		<img href="javascript:;" title="#{variable_js}" class="json_link" />
	 */
	setExtraLinks: function () {
		// links
		$$('.'+ this.cssJson + '_link').each(function(item){
			href = $(item).title;
			if(href != '') {
				$(item).href = href;
				$(item).title = '';
			}
		},this);
	},
	
	/**
	 * Setear id del proceso del getData
	 */
	setIdProcess: function (s) {
		this.idProcess = s;
	},
	
	setTarget: function (target) {
		this.target = target;
	},
	
	setTooltips: function (page) {

	},
	
	setUrlGetData: function (url) {
		if(url != '') {
			this.s_urlGetData = url;
		}
	},
	
	setTpl: function (tpl) {
		this.tpl = tpl;
	},
	
	/**
	 * Mostrar texto alternativo cuando no hay datos
	 * usa el id alternativo: no_ + target
	 */
	showNoItems: function(target) {
		var bros = '';
		if($(target)) {
			// si el target esta dentro de una tabla, ocultamos la tabla
			bros = $(target).siblings();
			bros.each(function(bro) {
				if($(bro).inspect() == '<thead>') {
					$(bro).hide();
				}
			});
			$(target).addClassName("hidden");

			notarget = "no_" + target;
			try {
				if($(notarget).hasClassName('hidden')) {
					$(notarget).removeClassName('hidden');
				}
				this.show(notarget);
			}
			catch(e){}
		}
	},
	
	/**
	 * Obtener datos dinamicos via ajax. la carga de datos (putData) puede ser o no personalizado
	 */
	_callData: function(urlDataAjax) {
		//var params;

		if(this.bDebug) {
			console.log('_callData', urlDataAjax);
		}
		
		if(urlDataAjax != '') {
			
			/*
			params = {
				onFailure: (function(response) {
					this._showJson();
					this.header(response.status);
				}).bind(this),

				onException: (function(response, error) {
					if(this.bDebug) {
						this.stopLoad();
						this._showJson();
						if(typeof(DGuardian) != 'undefined') {
							DGuardian.log('PrivaliaCoreJson.getData._callData.onException@' + this.getIdProcess() + ': ' + error);
						}
					}
				}).bind(this),

				onComplete: this._responseCallData.bind(this)
			};
			// llamada ajax: proveedor de datos
			new Ajax.Request(urlDataAjax, params);
			*/
			
			this.call(urlDataAjax, this._responseCallData.bind(this));
		}
		else {
			// error. no hay URL
			this._init();
			//this.errorMessage('04');
		}
	},
	
	/**
	 * Iniciar volcado de datos JSON
	 */
	_init: function() {
		//var s_idProcess = this.getIdProcess();
		//var DGuardianOn = (typeof(DGuardian) != 'undefined');

		// Si el valor es true entonces se inicia el proceso de tracking del site
		/*if (this.b_trackSite) {
			paramsAnalytics = this.getResWebanalytics(); // paramsAnalytics: info a trackear
			var urlAnalytics = this.getUrl(); 			 // urlAnalytics: ruta de la pagina cargada
			var extraData = this.getResData();
			Analytics.tracker(paramsAnalytics, urlAnalytics, extraData);
		}*/

		//if(this.demo) alert('_init(): Iniciamos el volcado inteligente de datos');
		if(this.bDebug) {
			this.buildPage(this.getSection());	// coge los bloques html y vuelca los datos
		}
		else {
			try {
				this.buildPage(this.getSection());	// coge los bloques html y vuelca los datos
			}
			catch(e) {
				if(DGuardianOn) {
					DGuardian.log(e, 'PrivaliaCoreJson.getData._init.buildPage@' + s_idProcess);
				}
			}
		}

		/*if(DGuardianOn) {
			DGuardian.setProgress(90, s_idProcess);
		}*/

		if(!this.error) {
			this.setTooltips(this.getSection());				// generar los tooltips estaticos de la pagina
			this.setExtraInputs();			// busca selects, checkboxes, etc. y marca su valor por defecto
			this.setExtraImg();				// busca imagenes dinamicas y los prepara bien
			this.setExtraLinks();			// busca enlaces dinamicas y los prepara bien

			/*if(DGuardianOn) {
				DGuardian.setProgress(98, s_idProcess);
			}*/

			this.stopLoad();				// finalizamos cargado, y mostramos los bloques cargados
			this._showJson();
			this.b_reloading = false;			// si estamos en modo actualizacion, lo terminamos
		}
		
		//PRV.Tracker.registerView(this.getResWebanalytics());
		
		this.postGetData();
	},
	
	/**
	 * vuelco al div los datos montados
	 * param string s_mode		puede ser 'push' (volcar sustituyendo) o 'add' (volcar agregando debajo)
	 */
	_pushBuilt: function (s_mode) {
		
		var target = this.getTarget();
		var data = this.getBuilt();
		
		if(data != '' && target != '') {			
			switch(s_mode) {
				case 'add':					
					$(target).insert({
						bottom: data
					});
				break;
				
				case 'push':
				default:
					$(target).update(this.built);
			}			
			
			this._setAsJsoned(target);
		}
	},
	
	_resetBuilt: function () {
		this.built = '';
		this.tpl = '';
	},
	
	/**
	 * acciones a realizar tras completar un callData (del getData)
	 * inicio de volcado de los datos.
	 * usado en getData y getDataFromAjax
	 */
	_responseCallData: function(response) {
		this.endCall(response);

		if(this.bDebug) {
			console.log('_responseCallData', response);
		}
		
		var DGuardianOn = (typeof(DGuardian) != 'undefined');

		if(DGuardianOn) {
			var s_idProcess = this.getIdProcess();
			DGuardian.setProgress(55, s_idProcess);
		}
		
		// comprobar si esta logeado
		if(this.isLogged()) {
			if(this.statusOK()) {
				if(this.bDebug) {
					this._setvData();
				}
				else {
					try {
						this._setvData();
					}
					catch(e) {
						if(DGuardianOn) {
							DGuardian.log(e, 'PrivaliaCoreJson.getData._callData._responseCallData._setvData@' + s_idProcess);
						}
					}
				}
				//if(this.demo) alert('getData(): obtenemos los datos via AJAX');

				if(this.bDebug) {
					this._init();
				}
				else {
					try {
						this._init();
					}
					catch(e) {
						if(DGuardianOn) {
							DGuardian.log(e, 'PrivaliaCoreJson.getData._callData._responseCallData._init@' + s_idProcess);
						}
					}
				}
			}
			else {
				this.error = true;
				this.stopLoad();
				PRV.UI.notify(this.getResTextcodes());
			}
		}
		else {
			this.error = true;
			this.logout();
		}

		if(DGuardianOn) {
			DGuardian.setProgress(100, s_idProcess);
		}
		
		this.stopTimeExecution();
	},
	
	/**
	 * Guardar el target y los datos Json a volcar y la URL del getData
	 */
	_set: function(target, json) {
		var html = '';
		
		if(this.bDebug) {
			console.log('_set', target, json);
		}

		if(target != "") {
			// la primera vez que se cargan los datos
			if(!this.b_reloading) {
				try {
					html = $(target).innerHTML;
				}
				catch(e) {
					if(this.bDebug) {
						if(typeof(DGuardian) != 'undefined') {
							DGuardian.warning(e, 'PrivaliaCoreJson.getData._callData._responseCallData._set@' + this.getIdProcess() + '['+target+']');
						}
					}
				}

				this.v_data[this.i_numTargets] = {
					id:		this.i_numTargets,
					html:	html,
					json: 	json,
					target: target
				};
			}
			else {
				// TODO: Revisar esta parte para que funcione en Importador de Contactos
				// actualizando datos. solo guardamos la info actualizada, no el html
				if(this.v_data.size() > 0) {
					this.v_data[this.i_numTargets].json = json;
				}
			}
			this.i_numTargets++;
		}
	},

	/**
	 * Busca los divs marcados con el cssJson y los remarca como cssJsoned.
	 * Esto sirve para saber que datos se han podido aplicar para luego mostrarlo
	 */
	_setAsJsoned: function(target) {
		if(target != "") {
			$(target).removeClassName(this.cssJson);
			$(target).addClassName(this.cssJsoned);
		}
	},
	
	/**
	 * Indicar el getData personalizado
	 * por defecto es 'generic'
	 */
	_setBuild: function (page) {
		if(page == '') {
			this.s_section = 'generic';
		}
	},
	
	/**
	 * Nos quedamos con la info "data" que hemos obtenido via Ajax, y desglosamos el conjunto de objetos con su identificador
	 */
	_setvData: function() {
		
		if(this.bDebug) {
			console.log('_setvData');
		}
		
		if(!Object.isArray(this.getResData())) {

			var h = new Hash(this.getResData());

			h.each(function(item) {
				target = item[0];
				values = item[1];

				// A veces nos pasan el valor como array de objetos, y otros como solo objeto
				if(Object.isArray(values)) {
					// el texto alternativo tiene q estar previamente definido en la tpl
					if(values.size() === 0) {
						this.showNoItems(target);
					}
					else {
						this._set(target, values);
					}
				}
				else {
					this._set(target, values);
					// el texto alternativo tiene q estar previamente definido en la tpl
					if(!values) {
						if(this.bDebug) {
							this.showNoItems(target);
						}
						else {
							try {
								this.showNoItems(target);
							}
							catch(e) {
								if(typeof(DGuardian) != 'undefined') {
									DGuardian.log(e, 'PrivaliaCoreJson.getData._callData._responseCallData._servData@' + s_idProcess + '. No hay items. Intenta ocultar texto alternativo pero no existe ninguno');
								}
							}
						}
					}
				}

			}, this);
		}

	},
	
	/**
	 * Mostrar todos los DIV's que tienen aplicados el estilo this.cssJson
	 */
	_showJson: function() {
		$$('.'+this.cssJsoned).each(function(item) {
			new Effect.Appear(item, {duration:this.duration_show});
		}, this);
		$$('.'+this.cssJson).each(function(item) {
			$(item).update('&nbsp;');
			new Effect.Appear(item, {duration:this.duration_show});
		}, this);
	}
});

PRV.Core.Sender = new Class.create(PRV.Core.IO, {
	initialize: function ($super) {
		$super();
		
		this.closeAfterSubmit =		true;
		this.cssError =				'error';
		this.cssInputError =		'isError';
		this.bDebug =				true;
		this.idFormActual =			'';
		this.firstInputError =		'';
		this.b_submitting = 		false;			// esta haciendo un submit, esperando respuesta AJAX
	},
	
	/**
	 * Cerramos el form. Se cerrara automaticamente si tiene el flag closeAfterSubmit puesto a true.
	 * Por defecto closeAfterSubmit = true
	 */
	closeForm: function() {
		// cerramos el form
		if(this.closeAfterSubmit) {
			PRV.UI.showAndHide();
		}
	},
	
	/**
	 * Callback generico del submit
	 * lo que se hace tras recibir la respuesta de un submit
	 */
	endSubmit: function (response) {
		this.endCall(response);
		if(this.statusOK()) {
			// cerrar formulario
			this.closeForm();

			// refrescar los datos
			//this.reload();
		}
		else {
			this.endSubmitError();
		}

		// mostrar mensaje de notificacion
		PRV.UI.notify(this.getResTextcodes());
		
		this.stopLoad();
		this.idFormActual = '';
	},
	
	/**
	 * Tras hacer un submit, nos devuelve un error. Tratamos los errores y los mostramos
	 */
	endSubmitError: function() {
		this._errorTreatment();				// gestiona los errores retornados y los aplica a cada campo erroneo
		this._clickInputError();			// aplicar Click: una vez se cambie el campo, se quite el estilo del error
		this._keyupInputError();			// aplicar keyUp: una vez teclee algo en el campo, se quite el estilo del error
		//PRV.UI.notify(this.getResTextcodes());
		//this._release();					// muestra los errores
	},
	
	/**
	 * Obtener los errores devueltos tras el submit
	 */
	getDataErrors: function() {
		return this.getResData().errors;
	},
	
	/**
	 * Trackea los errores del formulario
	 * @param {Object} sErrorList - lista de errores en formato id.error-
	 * @param {Object} sFormName - nombre del formulario en el que se registro el error
	 */
	setEventTracking: function (sErrorList, sFormName){
		sErrorList = sErrorList.substring(0, sErrorList.length-1);
 		oTrackingOptions = {
			'form': sFormName ,
			'fieldErrors': sErrorList 
		};  
		PRV.Tracker.registerEvent('FormError' , oTrackingOptions );
	},
	/**
	 * Envio de datos del formulario idForm. Tratamiento de los errores que nos pueda devolver el servidor
	 */
	submit: function(idForm, fCallback) {
		if(idForm !== '' && !this.b_submitting) {
			var sUrl = $(idForm).action;
			if(sUrl !== '') {
				var sParams = Form.serialize(idForm);
				this.b_submitting = true;
				
				if(fCallback === null) {
					// callback por defecto de un submit
					fCallback = this.endSubmit.bind(this);
				}

				// llamada ajax
				this.load(idForm);
				this.idFormActual = idForm;
				this._hideErrors(idForm);
				this.startTimeout();
				
				this.call(sUrl, fCallback, sParams)
			}
		}
		return false;
	},
	
	/**
	 * Ocultar el bloque de mensajes si esta abierto
	 */
	_hideErrors: function (sIdForm) {
		if(this.error_active) {
			PRV.UI.hideNotice(sIdForm);
		}
	},
	
	/**
	 * A los campos que estan marcados como error (isError),
	 * aplicamos evento Click para que una vez se cambie el campo, se quite el estilo del error
	 */
	_clickInputError: function() {
		var cssError = this.cssInputError;
		if(cssError != '') {
			$$('.'+cssError).each(function(item) {
				$(item).observe('click', (function() {
					this._resetInputError(item, cssError);
				}).bind(this));
			}, this);
		}
	},

	/**
	 * Marcar los campos que contenga algun error
	 */
	_errorField: function(field, error) {
		var codError = {};
		if(field != '') {
			$(field).addClassName(this.cssInputError);
			this._setErrorMsg(field, error);
		}
	},

	/**
	 * Tratamiento de errores.
	 * Parsear los errores que nos ha devuelto el servidor y marcar los campos que contiene algun error
	 */
	_errorTreatment: function() {
		var i = 0,
		oErr = this.getDataErrors(),
		sErrTrack = '',
		sFormName = '',
		oTrackingOptions = {};
		if(!Object.isUndefined(oErr)) {
			Object.keys(oErr).each(function(field) {
				if(this.firstInputError == '') {
					if($(field).type != 'hidden') {
					this.firstInputError = field;
				}
				}

				values = Object.values(oErr)[i];
				this._errorField(field, values);
				
				//Datos para el tracking de errores en formularios
				if (sFormName === ''){
					sFormName = $(field).form.id;
				}
				sErrTrack += field + '.' + values + '-';
				i++;
			}, this);
			this.setEventTracking(sErrTrack, sFormName);

			// enfocar el primer campo con error
			if(this.firstInputError != '') {
			$(this.firstInputError).focus();
			}
			this.firstInputError = '';

		}
	},

	/**
	 * A los campos que estan marcados como error (isError),
	 * aplicamos evento keyUp para que una vez se teclee algo en el campo, se quite el estilo del error
	 */
	_keyupInputError: function() {
		var cssError = this.cssInputError;
		if(cssError != '') {
			$$('.'+cssError).each(function(item) {
				$(item).observe('keyup', (function() {
					this._resetInputError(item, cssError);
				}).bind(this));
			}, this);
		}
	},

	/**
	 * Quita el estilo de error en el campo y anula los eventos aplicados al mismo
	 */
	_resetInputError: function(item, cssError) {
		if($(item).value != '') {
			$(item).removeClassName(cssError);
			$(item).stopObserving('click');
			$(item).stopObserving('keyup');
			// si no se ha especificado lo contrario, tendra un tooltip de error
			if(!$(item).hasClassName("tip-show-none")) {
				// ocultamos el tooltip de error que se ha mostrado tras el error
				idTxtError = "tip-" + $(item).identify();
				$(idTxtError).fade({duration:0.4});
			}
		}
	},
	
	/**
	 * Dado un error, marcar el campo que tiene error y describir el error debajo del campo
	 */
	_setErrorMsg: function(field, error) {
		if(error != '') {
			if(this.debug) {
				// mostramos los errores en formato tooltip
				this.showTooltipErrors(field, error);
			}
			else {
				try {
					// mostramos los errores en formato tooltip
					this.showTooltipErrors(field, error);
				}
				catch(e) {
					if(typeof(DGuardian) != 'undefined') {
						DGuardian.log('PrivaliaCoreForm._setErrorMsg@ Error crear tooltip: ' + e);
					}
				}
			}
		}
	}
});

PRV.Core.Page = {
	Loader: null,
	Sender: null,

	endCall: function (response) {
		if(this.Loader !== null) {
			this.Loader.endCall(response);
		}
		else if(this.Sender !== null) {
			this.Sender.endCall(response);
		}
	},
	
	endSubmitError: function () {
		this.Sender.endSubmitError();
	},

	getData: function (urlDataAjax, section) {
		this.Loader.getData(urlDataAjax, section);
	},

	setCssJson: function (css) {
		this.Loader.setCssJson(css);
	},
	
	setLoader: function (o_Loader) {
		this.Loader = new o_Loader;
	},
	
	setSender: function (o_Sender) {
		this.Sender = new o_Sender;
	},
	
	statusOK: function () {
		var bStatusOk = false;
		if(this.Loader !== null) {
			bStatusOk = this.Loader.statusOK();
		}
		else if(this.Sender !== null) {
			bStatusOk = this.Sender.statusOK();
		}
		
		return bStatusOk;
	},
	
	submit: function (idForm, fCallback) {
		return this.Sender.submit(idForm, fCallback);
	}
};


PRV.Error = new PRV.Core.Error();

PRV.Tracker = {
	bLoaded: 				false,				// la pagina se ha cargado y se ha registrado vista
	
	// Tracker Objects
	Omni:					null,				// objeto que controla todo lo relacionado con Omniture
	Ga:						null,				// objeto que controla todo lo relacionado con Google Analytics
		
	registerEvent: function (sEvent, oOptions) {
			// Omniture
			this.Omni.registerEvent(sEvent, oOptions);
			// Google Analytics
			this.Ga.registerEvent(sEvent, oOptions);
	},
	
	checkIfExpandedVersion: function (oVars){
		var bIsExpandedVersion = false;
		if (oVars.omniture !== undefined){
			bIsExpandedVersion = true;
		}
		return bIsExpandedVersion;
	},
	
	registerView: function (oVars) {
		if(!this.bLoaded && !Object.isArray(oVars)) {
			if(this.checkIfExpandedVersion(oVars)){
				this.Omni.setup();
				this.Omni.registerView(oVars.omniture);
				this.Ga.registerView(oVars.ga);
			} else {
				this.Omni.setup();
				this.Omni.registerView(oVars);
			}		
		}
	}
};

PRV.UI = new Class.create(PRV.Core, {
	initialize: function () {
		this.bDebug = 				true;
		
		this.duration_hide =		0.2;				// segundos que dura la transicion para ocultar un elemento
		this.duration_show =		0.3;				// segundos que dura la transicion para mostrar un elemento
		// show and hide
		this.sah_hide =				'';					// div que esta oculto y se quiere mostrar
		this.sah_show =				'';					// div que se quiere ocultar
		this.sah_sufix =			'_data';			// sufijo para los divs a mostrar y ocultar
	},
	
	/**
	 * Cerramos el div de notificaciones
	 */
	closeNotify: function() {
		if(!$(this.idNotification).empty()) {
			this.hideItem(this.idNotification);
		}
	},
	
	/**
	 * hideItem oculta el elemento que tenga el id que se le pase como parametro al metodo
	 */
	hideItem: function(div) {
		$(div).slideUp({duration: this.duration_hide});
	},
	
	/**
	 * Ocultar el mensaje de notificacion si esta visible
	 */
	hideNotice: function (sTarget) {
		var id = sTarget;
		if($(id).getStyle('display') != 'none') {
			$(id).slideUp({duration:0.1});
		}
	},
	
	/**
	 * Mostrar mensaje de exito o error (notificaciones).
	 * Necesita un div target en la tpl. por defecto es <div id="notification">, y es donde cargara el mensaje
	 */
	notify: function (textcode, description) {
		var cssbox = 	'';
		var prefix = 	'';

		if(textcode != '') {
			var txt = this.getMsgCode(textcode);

			if($(this.idNotification) !== null) {
				$(this.idNotification).update('');
				$(this.idNotification).setStyle('display','none');

				if(description === undefined) {
					description = '';
				}

				// obtener tipo de mensaje para cargar su estilo de caja
				prefix = textcode.substring(3,5);
				switch(prefix) {
					case '01':
						cssbox = 'box-err';
						break;

					case '02':
						cssbox = 'box-inf';
						break;

					case '03':
						cssbox = 'box-ok';
						break;
						
					case '04':					
						cssbox = 'box-generic';
						break;
						
					 default:
						cssbox = 'box-ok';
						break;
				}

				// contenido
				if(description != '') {
					txt = txt + '</p><p>' + description;
				}

				// generar la caja para notificaciones,
				var tplBox = new Template(TPL_NOTICE);
				var box = tplBox.evaluate({
					cssbox: cssbox,
					notice: txt
				});


				// mostrar
				$(this.idNotification).show();
				$(this.idNotification).appear({from: 0, to: 1, duration: this.duration_show});

				// cargar contenido
				$(this.idNotification).update(box);

				// mover hacia la caja del notify
				if(this.b_scrollToNotify) {
					Effect.ScrollTo(this.idNotification, {duration:0.7});
				}

				// evento boton cerrar
				$$('#' + this.idNotification + ' .ico-close').each(function(item) {
					$(item).observe('click', (function() {
						this.closeNotify();
					}).bind(this));
				}, this);

			}
			else {
				if(typeof(DGuardian) != 'undefined') {
					DGuardian.log('PrivaliaCoreErrors.notify@ Div '+ this.idNotification +' no existe');
				}
			}
		}
	},
	
	/**
	 * Efecto de reemplazo,
	 * @param {Object} show	- id de elemento a mostrar
	 * @param {Object} hide - id de elemento a ocultar
	 */
	showAndHide: function(show, hide) {
		// si no se ha pasado una id de elemento a mostrar
		if(show === undefined) {
			// muestra la div que esta oculta y se quiere mostrar
			this.showItem(this.sah_hide);
			// oculta la div que esta visible y se quiere ocultar
			this.hideItem(this.sah_show);
			this.sah_hide = '';
			this.sah_show = '';
		}
		else {
			// si no se ha pasado una id de elemento a ocultar
			if(hide === undefined)	{
				// hide recoge el valor de la id que se quiere mostrar concatenado con el contenido de la variable this.sah_sufix
				hide = show + this.sah_sufix;
			}
			// muestra la id pasada
			this.showItem(show);
			// oculta la id pasada
			this.hideItem(hide);

			this.sah_hide = hide;
			this.sah_show = show;
		}
	},

	/**
	 * showItem muestra el elemento que tenga el id que se le pase como parametro al metodo
	 */
	showItem: function(div) {
		$(div).slideDown({
			duration: this.duration_show,
			// con esto eliminamos el desmaquetado de los formularios al hacer doble click en "editar"
			transition: Effect.Transitions.full
		});
	},

	/**
	 * Mostrar texto alternativo cuando no hay datos
	 * usa el id alternativo: no_ + target
	 */
	showNoItems: function(target) {
		if($(target)) {
			// si el target esta dentro de una tabla, ocultamos la tabla
			var bros = $(target).siblings();
			bros.each(function(bro) {
				if($(bro).inspect() == '<thead>') {
					$(bro).hide();
				}
			});
			$(target).addClassName("hidden");

			var notarget = "no_" + target;
			try {
				if($(notarget).hasClassName('hidden')) {
					$(notarget).removeClassName('hidden');
				}
				this.show(notarget);
			}
			catch(e){}
		}
	},
	
	showNotice: function () {
		
	}
});/**
 *  23-prv.util.js
 * =========================================
 * @requieres: 	--
 * @revision: 	1.0
 */

/**
 * PRV.Util - Common
 * =========================================
 * @modified: 	Marcos (23-06-11)
 */
 
PRV.Url = {
	h_link: $H({
		'microsites': 'microsites/index'
	}),
	
	/**
	* Obtener el valor de un parametro pasado por URL.
	* El formato de URL que es capaz de interpretar es:
	* www.dominio.com/param1/value1/param2/value2
	*/
	getUrlParamValue: function (param, url) {
		 var value = '',
		 v_tmp = [];
	
		 if(param != '') {
			 // url es opcional. si no nos lo especifican, obtener la url del navegador
	    	 if(arguments.length == 1) {
	    		 url = document.location.href.toLowerCase();
	    	 }
	
	    	 // spliteamos hasta obtener el valor deseado
	    	 v_tmp = url.split(param + "/");
	    	 if((v_tmp.length >0) && (v_tmp[1] !== undefined) ) {
	    		 value = v_tmp[1].split("/")[0];
	    		 value = value.split("#")[0];
	    	 }
		 }
	
		 return value;
	 },
	
	go: function(page) {
		var s_url = '';
		
		if(page) {
			s_url = this.h_link.get(page);
			if(s_url != '') {
				document.location.href = s_url;
			}
		}
	}
};

PRV.Copy = {
	v_txt: [],				// contenedor para las traducciones
	
	/**
	 * Obtener traduccion de un texto
	 */
	getTxt: function(text) {
		return this.v_txt[text];
	},
	
	/**
	 * Definir y guardar la traduccion de un texto
	 */
	setTxt: function(text, translation) {
		this.v_txt[text] = translation;
	}
};

PRV.Timer = {
	/*
	 * Metodo que transforma segundos en dias, horas, minutos y segundos
	 * @param {Object} seconds - input de segundos
	 * @param {Object} daysRequired - 0 para resultado sin dias, 1 para resultado con dias
	 */
	getExpiresTime: function(seconds, daysAndHoursRequired){
		var timeInDays = '',
		numdays = Math.floor(seconds / 86400), // Dias
		numhours = 0,
		numminutes = 0,
		numseconds = ((seconds % 86400) % 3600) % 60; // Segundos

		// Horas
		if(Math.floor((seconds % 86400) / 3600) < 10){
			numhours = "0" + Math.floor((seconds % 86400) / 3600);
		}else{
			numhours = Math.floor((seconds % 86400) / 3600);
		}
		// Minutos
		if(Math.floor(((seconds % 86400) % 3600) / 60) < 10 ){
			numminutes = "0" + Math.floor(((seconds % 86400) % 3600) / 60);
		}else{
			numminutes = Math.floor(((seconds % 86400) % 3600) / 60);
		}

		// Volcado, diferenciando si se requieren dias y horas
		if (daysAndHoursRequired == 1){
			if (numdays == 1){
				timeInDays += numdays + ' ' + PRV.Copy.getTxt('day') + ', ' + numhours + PRV.Copy.getTxt('h');
			}else if(numdays != 0){
				timeInDays += numdays + ' ' + PRV.Copy.getTxt('days')+ ', ' + numhours + PRV.Copy.getTxt('h');
			}else{
				timeInDays += numhours + PRV.Copy.getTxt('h');
			}
			timeInDays += ' ' + numminutes + PRV.Copy.getTxt('min');
			return	timeInDays;
		}else{
			timeInDays +=  numminutes +":"+ numseconds;
			return	timeInDays;
		}
	}
};

PRV.Util = {
	
};VERSION_PrivaliaCore='2.4.2';var PrivaliaCoreErrors=Class.create({initialize:function(){this.errId='81';this.error=false;this.i_segTimeout=15;this.timeout=null;this.txt_msgError='Unable to load the page properly. Try again in a few minutes';this.url_400=URL_DOMAIN+'/error/e400';this.url_408=URL_DOMAIN+'/error/e408';this.url_500=URL_DOMAIN+'/error/e500';this.b_timeout=false;this.debug=true;this.demo=false;this.version=1.1;this.o_versions=$H();this.setVersion(this.version,'PrivaliaCoreErrors');},checkVersion:function(s_object,f_version){var ok=false;if(this.getVersion(s_object)>=f_version){ok=true;}
else{if(this.debug){if(typeof(DGuardian)!='undefined'){DGuardian.log('Check version error. '+s_object+' < '+f_version);}}}
return ok;},errorMessage:function(errorCode){if(typeof(DGuardian)!='undefined'){DGuardian.log('errorMessage@'+errorCode);}},header:function(status){this.load();switch(status){case 400:document.location.href=this.url_400;break;case 408:document.location.href=this.url_408;break;case 500:document.location.href=this.url_500;break;default:if(this.debug){}
this.stopLoad();}},getVersion:function(s_object){return this.o_versions.get(s_object);},onHeader400:function(redirectUrl){this.url_400=redirectUrl;},setErrorMsg:function(txt){this.txt_msgError=txt;},setMode:function(value){switch(value){case'debug':this.debug=true;if(typeof(DGuardian)!='undefined'){DGuardian.setDevel(true);}
break;case'demo':this.demo=true;break;case'simulate':this.debug=true;break;default:this.debug=true;this.demo=false;}},setSecondsTimeout:function(i_sec){this.i_segTimeout=i_sec;},setVersion:function(f_version,s_object){this.o_versions.set(s_object,f_version);},showAllVersions:function(){this.o_versions.each(function(ver){console.log(ver.key+": "+ver.value);});},startMode:function(){if(document.location.href.indexOf("simulate")>-1){this.setMode('simulate');}
else if(document.location.href.indexOf("jsversion")>-1){this.setMode('debug');this.showAllVersions();}
else if(document.location.href.indexOf("debug")>-1||document.location.href.indexOf("privalia.loc")>-1){this.setMode('debug');}
else if(document.location.href.indexOf("demo")>-1){this.setMode('demo');}},startTimeout:function(){if(this.b_timeout){var seconds=this.i_segTimeout;this.timeout=window.setTimeout((function(){this.header(408);}).bind(this),seconds*1000);}},stopTimeout:function(){if(this.b_timeout){window.clearTimeout(this.timeout);if(this.debug){}}}});var PrivaliaCoreUI=new Class.create(PrivaliaCoreErrors,{initialize:function($super){$super();this.duration_hide=0.2;this.duration_show=0.3;this.errId='82';this.idLoadText='loading';this.idNotification='notification';this.idPage='page';this.loading=false;this.loadingTarget='';this.loadingText=true;this.sah_hide='';this.sah_show='';this.sah_sufix='_data';this.closeAfterSubmit=false;this.b_scrollToNotify=false;this.showLoad=true;this.version=3.0;this.setVersion(this.version,'PrivaliaCoreUI');},closeForm:function(){if(this.closeAfterSubmit){this.showAndHide();}},closeNotify:function(){if(!$(this.idNotification).empty()){this.hideItem(this.idNotification);}},hideAllData:function(id){$$("#"+id+" .accordion-content").each(function(item){$(item).slideUp({duration:0.3});});$$("#"+id+" .important6").each(function(item){$(item).removeClassName('open important6');$(item).addClassName('important3');});},hideItem:function(div){$(div).slideUp({duration:this.duration_hide});},getMsgCode:function(err){return MSGCODE[err];},load:function(target){if(this.showLoad){if(Object.isUndefined(target)){target='page';}
if(!this.loading){this.loadingTarget=target;if(!Prototype.Browser.IE){$(this.loadingTarget).startWaiting();}
this.loading=true;}}},loadText:function(txt){if(this.loadingText){if(!txt){txt="loading";}
try{$(this.idLoadText).update(txt+"...");$(this.idLoadText).show();}
catch(e){if(this.debug){console.log('PrivaliaCoreUI.loadText ('+this.errId+'): ',e);}}}},notify:function(textcode,description){var cssbox='';var prefix='';if(textcode!=''){var txt=this.getMsgCode(textcode);if($(this.idNotification)!==null){$(this.idNotification).update('');$(this.idNotification).setStyle('display','none');if(description===undefined){description='';}
prefix=textcode.substring(3,5);switch(prefix){case'01':cssbox='box-err';break;case'02':cssbox='box-inf';break;case'03':cssbox='box-ok';break;case'04':cssbox='box-generic';break;default:cssbox='box-ok';break;}
if(description!=''){txt=txt+'</p><p>'+description;}
var tplBox=new Template(TPL_NOTICE);box=tplBox.evaluate({cssbox:cssbox,notice:txt});$(this.idNotification).show();$(this.idNotification).appear({from:0,to:1,duration:this.duration_show});$(this.idNotification).update(box);if(this.b_scrollToNotify){Effect.ScrollTo(this.idNotification,{duration:0.7});}
$$('#'+this.idNotification+' .ico-close').each(function(item){$(item).observe('click',(function(){this.closeNotify();}).bind(this));},this);}
else{if(typeof(DGuardian)!='undefined'){DGuardian.log('PrivaliaCoreErrors.notify@ Div '+this.idNotification+' no existe');}}}},refreshPage:function(){$(this.idPage).startWaiting();this.loadText();document.location.href=document.location.href;},setCloseAfterSubmit:function(value){this.closeAfterSubmit=value;},setShowLoad:function(showLoad){this.showLoad=showLoad;},setNotification:function(id){this.idNotification=id;},showAllData:function(id){$$("#"+id+" .accordion-content").each(function(item){$(item).slideDown({duration:0.3});});$$("#"+id+" .important3").each(function(item){$(item).className='important3 open important6';});},showAndHide:function(show,hide){if(show===undefined){this.showItem(this.sah_hide);this.hideItem(this.sah_show);this.sah_hide='';this.sah_show='';}
else{if(hide===undefined){hide=show+this.sah_sufix;}
this.showItem(show);this.hideItem(hide);this.sah_hide=hide;this.sah_show=show;}},showItem:function(div){$(div).slideDown({duration:this.duration_show,transition:Effect.Transitions.full});},showNoItems:function(target){if($(target)){bros=$(target).siblings();bros.each(function(bro){if($(bro).inspect()=='<thead>'){$(bro).hide();}});$(target).addClassName("hidden");notarget="no_"+target;try{if($(notarget).hasClassName('hidden')){$(notarget).removeClassName('hidden');}
this.show(notarget);}
catch(e){}}},stopLoad:function(){if(this.loading){$(this.loadingTarget).stopWaiting();this.loading=false;this.loadingTarget='';}},stopLoadText:function(){try{$(this.idLoadText).fade({duration:0.5});}
catch(e){if(this.debug){alert('PrivaliaCoreUI.stopLoadText ('+this.errId+'): ',e);}}},toggleData:function(id,obj){$(obj).toggleClassName('open').toggleClassName('important6');Effect.toggle(id,'blind',{duration:0.3});},toggleTooltip:function(div){var divShow=$(div).getStyle('display');if(divShow=='none'){$(div).show();}
else{$(div).hide();}}});var PrivaliaCoreJson=Class.create(PrivaliaCoreUI,{initialize:function($super){$super();this.b_testResponse=false;this.build='';this.built='';this.cssJson='json';this.cssJsoned='jsoned';this.errId='82';this.idProcess='';this.numTargets=0;this.reloading=false;this.res_data='';this.res_textcodes='';this.res_status='';this.res_webanalytics='';this.tpl='';this.target='';this.url_getData='';this.vData=[];this.b_trackSite=Country.getTracking();this.reloadData=true;this.version=4.0;this.setVersion(this.version,'PrivaliaCoreJson');},addBuilt:function(dataJson){this.built+=this.tpl.evaluate(dataJson);},buildPage:function(generate){switch(generate){case'generic':default:this.generateHtml();}},getBuild:function(){return this.build;},getCssJson:function(){return this.cssJson;},getData:function(urlDataAjax,section){var DGuardianOn=(typeof(DGuardian)!='undefined');var s_idProcess='getdata_'+urlDataAjax;this.setIdProcess(s_idProcess);if(DGuardianOn){DGuardian.setProcess(s_idProcess);}
if(urlDataAjax!=""){this._setBuild(section);if(this.demo)alert('Esta es la pagina que se va a cachear. Nuevo objeto PJSON()');this._preinit();this.setUrlGetData(urlDataAjax);this._callData(urlDataAjax);this.startTimeout();if(DGuardianOn){DGuardian.progress(5,s_idProcess);}}
else{this.errorMessage('03');}},getIdProcess:function(){return this.idProcess;},setIdProcess:function(s){this.idProcess=s;},getDataFromAjax:function(section){if(section!=""){this._setBuild(section);if(this.demo)alert('Esta es la pagina que se va a cachear. Nuevo objeto PJSON()');this._preinit();this.stopLoad();this._responseCallData();this.startTimeout();}
else{this.errorMessage('01');}},getResData:function(){return this.res_data;},getResStatus:function(){return this.res_status;},getResTextcodes:function(){return this.res_textcodes.code;},getResWebanalytics:function(){return this.res_webanalytics;},generateHtml:function(options){var html='';this._resetBuilt();if(this.numTargets>0){var options=Object.extend({pushData:this.pushBasic,mode:'push'},arguments[0]||{});this.vData.each(function(oData){var target=oData.target;var html=oData.html;if(!html.empty()){this.setTarget(target);var tpl=new Template(html);this.setTpl(tpl);if(Object.isArray(oData.json)){vDataToPush=oData.json;}
else{vDataToPush=[oData.json];}
vDataToPush.each(options.pushData.bind(this));this._pushBuilt(options.mode);this._resetBuilt();}
html='';},this);}},getBuilt:function(){return this.built;},getTarget:function(){return this.target;},getUrlGetData:function(){return this.url_getData;},parseResponse:function(response){if(this.b_testResponse){var Res=new Hash(response);}
else{var Res=new Hash(response.responseText.evalJSON());}
this.res_data=Res.get("data");this.res_status=Res.get("status");this.res_textcodes=Res.get("textcodes");this.res_webanalytics=Res.get("webanalytics");},pushBasic:function(dataJson){this.addBuilt(dataJson);},reload:function(){if(this.reloadData){var url=this.url_getData;this.numTargets=0;this.reloading=true;this.getData(url,this.build);}},reset:function(){this.numTargets=0;this.vData=[];},setCssJson:function(style){this.cssJson=style;},setExtraInputs:function(){$$('.'+this.cssJson+'_radio').each(function(item){var key=$(item).identify();var value=$F(item);if(value!=''){$(key+'_'+value).checked=true;}},this);$$('.'+this.cssJson+'_select').each(function(item){var key=$(item).identify();var value=$F(item);if(value!=''){if($(key).title!=''){if(key=='member_birthday'){valor=$(key).title;if(valor.substring(0,1)=='0'){$(key).value=valor.substring(1);}
else{$(key).value=$(key).title;}}
else{$(key).value=$(key).title;}}}},this);},setExtraImg:function(){$$('.'+this.cssJson+'_img').each(function(item){pathImg=$(item).title;if(pathImg!=''){$(item).src=pathImg;$(item).title='';}},this);},setExtraLinks:function(){$$('.'+this.cssJson+'_link').each(function(item){href=$(item).title;if(href!=''){$(item).href=href;$(item).title='';}},this);},setReload:function(reload){this.reloadData=reload;},setReloading:function(reload){this.reloading=reload;},setResData:function(data){this.res_data=data;},setTarget:function(target){this.target=target;},setTooltips:function(page){},setTpl:function(tpl){this.tpl=tpl;},setUrlGetData:function(url){if(url!=''){this.url_getData=url;}},statusOK:function(){return(this.getResStatus()=="success");},testResponse:function(json){this.test_response=json;this.b_testResponse=true;},_callData:function(urlDataAjax){var params;if(urlDataAjax!=''){params={onFailure:(function(response){if(this.debug){}
this._showJson();this.header(response.status);}).bind(this),onException:(function(response,error){if(this.debug){this.stopLoad();this._showJson();if(typeof(DGuardian)!='undefined'){DGuardian.log('PrivaliaCoreJson.getData._callData.onException@'+this.getIdProcess()+': '+error);}}}).bind(this),onComplete:this._responseCallData.bind(this)};new Ajax.Request(urlDataAjax,params);}
else{this._init();this.errorMessage('04');}},_hideJson:function(){$$('.'+this.cssJson).each(function(item){$(item.identify()).hide();});},_init:function(){var s_idProcess=this.getIdProcess();var DGuardianOn=(typeof(DGuardian)!='undefined');if(this.b_trackSite){PRV.Tracker.registerView(this.getResWebanalytics());}
if(this.demo)alert('_init(): Iniciamos el volcado inteligente de datos');if(this.debug){this.buildPage(this.getBuild());}
else{try{this.buildPage(this.getBuild());}
catch(e){if(DGuardianOn){DGuardian.log(e,'PrivaliaCoreJson.getData._init.buildPage@'+s_idProcess);}}}
if(DGuardianOn){DGuardian.setProgress(90,s_idProcess);}
if(!this.error){this.setTooltips(this.getBuild());this.setExtraInputs();this.setExtraImg();this.setExtraLinks();if(DGuardianOn){DGuardian.setProgress(98,s_idProcess);}
this.stopLoad();this._showJson();this.reloading=false;}},_preinit:function(){this.load();if(this.demo)alert('_preinit(): modo carga y tenemos previamente los bloques dinamicos ocultos');},_pushBuilt:function(s_mode){var target=this.getTarget();var data=this.getBuilt();if(data!=''&&target!=''){switch(s_mode){case'add':$(target).insert({bottom:data});break;case'push':default:$(target).update(this.built);}
this._setAsJsoned(target);}},_resetBuilt:function(){this.built='';this.tpl='';},_responseCallData:function(response){var DGuardianOn=(typeof(DGuardian)!='undefined');if(DGuardianOn){var s_idProcess=this.getIdProcess();DGuardian.setProgress(55,s_idProcess);}
this.stopTimeout();if(this.b_testResponse){this.parseResponse(this.test_response);}
else if(response!==undefined){this.parseResponse(response);}
if(this.isLogged()){if(this.statusOK()){if(this.debug){this._setvData();}
else{try{this._setvData();}
catch(e){if(DGuardianOn){DGuardian.log(e,'PrivaliaCoreJson.getData._callData._responseCallData._setvData@'+s_idProcess);}}}
if(this.demo)alert('getData(): obtenemos los datos via AJAX');if(this.debug){this._init();}
else{try{this._init();}
catch(e){if(DGuardianOn){DGuardian.log(e,'PrivaliaCoreJson.getData._callData._responseCallData._init@'+s_idProcess);}}}}
else{this.error=true;this.stopLoad();this.notify(this.getResTextcodes());}}
else{this.error=true;this.logout();}
if(DGuardianOn){DGuardian.setProgress(100,s_idProcess);}},_set:function(target,json){var html='';if(target!=""){if(!this.reloading){try{html=$(target).innerHTML;}
catch(e){if(this.debug){if(typeof(DGuardian)!='undefined'){DGuardian.warning(e,'PrivaliaCoreJson.getData._callData._responseCallData._set@'+this.getIdProcess()+'['+target+']');}}}
this.vData[this.numTargets]={id:this.numTargets,html:html,json:json,target:target};}
else{if(this.vData.size()>0){this.vData[this.numTargets].json=json;}}
this.numTargets++;}},_setAsJsoned:function(target){if(target!=""){$(target).removeClassName(this.cssJson);$(target).addClassName(this.cssJsoned);}},_setBuild:function(page){if(page===undefined){page='generic';}
this.build=page;},_setvData:function(){if(!Object.isArray(this.getResData())){var h=new Hash(this.getResData());h.each(function(item){target=item[0];values=item[1];if(Object.isArray(values)){this._set(target,values);if(values.size()===0){this.showNoItems(target);}}
else{this._set(target,values);if(!values){if(this.debug){this.showNoItems(target);}
else{try{this.showNoItems(target);}
catch(e){if(typeof(DGuardian)!='undefined'){DGuardian.log(e,'PrivaliaCoreJson.getData._callData._responseCallData._servData@'+s_idProcess+'. No hay items. Intenta ocultar texto alternativo pero no existe ninguno');}}}}}},this);}},_showJson:function(){$$('.'+this.cssJsoned).each(function(item){new Effect.Appear(item,{duration:this.duration_show});},this);$$('.'+this.cssJson).each(function(item){$(item).update(' ');new Effect.Appear(item,{duration:this.duration_show});},this);}});var PrivaliaCoreForm=new Class.create(PrivaliaCoreJson,{initialize:function($super){$super();this.b_submitting=false;this.cssError='error';this.cssInputError='isError';this.errId='83';this.error_active=false;this.error_pre='divFMsg_';this.error_showFx=0.8;this.error_sufix='_txt';this.firstInputError='';this.idFormActual='';this.prefixCodError='msg';this.version=2.3;this.setVersion(this.version,'PrivaliaCoreForm');},endSubmit:function(response){this.stopTimeout();this.parseResponse(response);if(this.statusOK()){this.closeForm();this.reload();this.notify(this.getResTextcodes());}
else{this.endSubmitError();}
this.stopLoad();this.idFormActual='';},endSubmitError:function(){this._errorTreatment();this._clickInputError();this._keyupInputError();this.notify(this.getResTextcodes());},getDataErrors:function(){return this.res_data.errors;},getFormActual:function(){return this.idFormActual;},setEventTracking:function(sErrorList,sFormName){sErrorList=sErrorList.substring(0,sErrorList.length-1);oTrackingOptions={'form':sFormName,'fieldErrors':sErrorList};PRV.Tracker.registerEvent('FormError',oTrackingOptions);},setInputTitle:function(idInput,title){try{$(idInput).title=title;}
catch(e){};},showErrors:function(msg,idForm){if(msg!=''){var id=this.error_pre+idForm;if(this.error_active){$(id).update(msg);$(id).appear({duration:this.error_showFx});}
else{this.error_active=true;var newdiv=new Element('div',{id:id,className:'divFormMessage',style:'display:none'});$$("#"+idForm+" legend")[0].insert({after:newdiv});$(id).update(msg);$(id).appear({duration:this.error_showFx});}}},showTooltipErrors:function(field,error){var b_createTooltip=true;var positionTarget='r';var positionTip='l';var prefixTooltipShow='tip-show-';var urlPage=this.getUrl();var urlPage=urlPage.split("/")[4];v_css=$(field).classNames().toArray();v_css.each(function(css){if(css.substring(0,prefixTooltipShow.length)==prefixTooltipShow){positionTarget=css.substring(prefixTooltipShow.length);}});if($(field).type=="checkbox"){positionTarget='b';}
if(urlPage=='firstbuy'){if($(field).type=="hidden"&&!$(field).hasClassName("tip-show-none")){positionTarget='b';}
else if($(field).id=="memaddress_zipcode"){positionTarget='l';}}
switch(positionTarget){case'none':b_createTooltip=false;break;case'b':positionTip='tl';break;case't':positionTip='b';break;case'l':positionTip='r';break;default:case'r':positionTip='l';break;}
if(b_createTooltip){new PrivaliaTooltip(field,MSGCODE[error],{closeBtn:false,status:'error',showNow:true,target:positionTarget,tip:positionTip});}},stopLoad:function($super){$super();if(this.b_submitting){this.b_submitting=false;}},submit:function(idForm,onComplete){if(idForm!=''&&!this.b_submitting){url=$(idForm).action;if(url!=''){this.b_submitting=true;params={parameters:Form.serialize(idForm),onFailure:(function(){this.errorMessage('01');}).bind(this)};if(onComplete!=null){params.onComplete=onComplete;}
else{params.onComplete=this.endSubmit.bind(this);}
this.load(idForm);this.idFormActual=idForm;this._hideErrors(idForm);this.startTimeout();new Ajax.Request(url,params);}}
return false;},_clickInputError:function(){var cssError=this.cssInputError;if(cssError!=''){$$('.'+cssError).each(function(item){$(item).observe('click',(function(){this._resetInputError(item,cssError);}).bind(this));},this);}},_errorField:function(field,error){var codError={};if(field!=''){$(field).addClassName(this.cssInputError);this._setErrorMsg(field,error);}},_errorTreatment:function(){var i=0,oErr=this.getDataErrors(),sErrTrack='',sFormName='',oTrackingOptions={};if(!Object.isUndefined(oErr)){Object.keys(oErr).each(function(field){if(this.firstInputError==''){if($(field).type!='hidden'){this.firstInputError=field;}}
values=Object.values(oErr)[i];this._errorField(field,values);if(sFormName===''){sFormName=$(field).form.id;}
sErrTrack+=field+'.'+values+'-';i++;},this);this.setEventTracking(sErrTrack,sFormName);if(this.firstInputError!=''){$(this.firstInputError).focus();}
this.firstInputError='';}},_hideErrors:function(idForm){if(this.error_active){var id=this.error_pre+idForm;if($(id).getStyle('display')!='none'){$(id).slideUp({duration:0.1});}}},_keyupInputError:function(){var cssError=this.cssInputError;if(cssError!=''){$$('.'+cssError).each(function(item){$(item).observe('keyup',(function(){this._resetInputError(item,cssError);}).bind(this));},this);}},_resetInputError:function(item,cssError){if($(item).value!=''){$(item).removeClassName(cssError);$(item).stopObserving('click');$(item).stopObserving('keyup');if(!$(item).hasClassName("tip-show-none")){idTxtError="tip-"+$(item).identify();$(idTxtError).fade({duration:0.4});}}},_setErrorMsg:function(field,error){if(error!=''){if(this.debug){this.showTooltipErrors(field,error);}
else{try{this.showTooltipErrors(field,error);}
catch(e){if(typeof(DGuardian)!='undefined'){DGuardian.log('PrivaliaCoreForm._setErrorMsg@ Error crear tooltip: '+e);}}}}}});var PrivaliaCore=new Class.create(PrivaliaCoreForm,{initialize:function($super){$super();this.errId='84';this.url_actual='';this.url_logout=URL_DOMAIN+'/public/notlogged';this.version=1.0;this.setVersion(this.version,'PrivaliaCore');},feedSelect:function(target,data){var built='';if(target!=''&&TPL_SELECT!=''){var tpl=new Template(TPL_SELECT);data.each(function(option){option.label=option.value;option.value=option.id;option.id='';built+=tpl.evaluate(option);});if(built!=''){$(target).insert({bottom:built});$(target).selectedIndex=0;}}},getUrl:function(){var url;if(this.url_actual!=''){url=this.url_actual;}
else{url=document.location.href;this.url_actual=url;}
return url;},isLogged:function(){var code=this.getResTextcodes();var codeNotLogged="msg0100403";var loggedIn=true;if(code==codeNotLogged){loggedIn=false;}
return loggedIn;},logout:function(){this.loadText('session expired');document.location.href=this.url_logout;},setAutocompleteOff:function(input){$(input).setAttribute("autocomplete","off");}});var PrivaliaCoreAnalytics=new Class.create(PrivaliaCoreErrors,{initialize:function($super){$super();this.jsonObject='';this.url_section='';this.s_prefixEvent='omni_';this.current_url='';this.version=2.0;this.setVersion(this.version,'PrivaliaCoreAnalytics');},basicTracking:function(){if(Country.b_trackSite){PRV.Tracker.registerView('');}},getCurrentUrl:function(){var url;if(this.current_url!=''){url=this.current_url;}
else{url=document.location.href;this.current_url=url;}
return url;},captureEvents:function(){Event.observe(window,'load',(function(){$$('div.omniban').each(function(elm,index){index++;elm.observe('click',(function(event){var anchor_element=elm;var v_classes=$w(anchor_element.className);var s_anchor_id=elm.identify();var s_anchor_split=s_anchor_id.split("-");var s_anchor_name=s_anchor_split[0];var s_anchor_size=s_anchor_split[1];var class_length=v_classes.size();if(class_length>1){var v_class=v_classes.grep(this.s_prefixEvent);var s_class=v_class.join();var s_result_class=s_class.split("_");var s_result_event=s_result_class[1];this.processBannerEvents(s_result_event,s_anchor_id,s_anchor_name,s_anchor_size);}}).bind(this));},this);$$('a.omni').each(function(elm,index){index++;elm.observe('click',(function(event){var anchor_element=elm;var v_classes=$w(anchor_element.className);var class_length=v_classes.size();if(class_length>1){var v_class=v_classes.grep(this.s_prefixEvent);var s_class=v_class.join();var s_result_class=s_class.split("_");var s_result_event=s_result_class[1];this.processEvents(s_result_event);}}).bind(this));},this);}).bind(this));},autoSendErrors:function(elm){var v_classes=$w($(elm).className);var class_length=v_classes.size();if(class_length>1){var v_class=v_classes.grep(this.s_prefixEvent);var s_class=v_class.join();var s_result_class=s_class.split("_");var s_result_event=s_result_class[1];this.processErrorEvents(s_result_event);}},autoSendErrorsMsg:function(msg){if(msg!=null){this.processErrorMsg(msg);}},executeData:function(data){},processData:function(jsonData){this.jsonObject=new Hash(jsonData);return jsonData;},tracker:function(jsonData,sectionUrl,extra){this.url_section=sectionUrl;if(!Object.isArray(jsonData)){this.extrainfo=extra;var data=this.processData(jsonData);this.executeCode(data);}
else{}}});/**
 *  90-privalia.base.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, protoload.js
 * @revision: 	1.0
 */


/**
 * PrivaliaBaseBreadcrumb - Common
 * =========================================
 * @modified: 	Marcos (16-3-11)
 */
var PrivaliaBaseBreadcrumb = Class.create(PrivaliaCore, {
	initialize: function($super) {
	$super();
	
	// fetch session data and calculate client session timestamp
	var sessionTimestamp = Cookies.get('session_timestamp').split(";");
	var sessionTimestampClient = Cookies.get('session_timestamp_client').split(";");
	if (sessionTimestamp[0] != sessionTimestampClient[0]) {
		var timestamp = (new Date()).getTime();
		var rootDomain = URL_DOMAIN.substring(URL_DOMAIN.lastIndexOf('.', URL_DOMAIN.lastIndexOf('.') - 1) + 1);
		Cookies.set('session_timestamp_client', sessionTimestamp[0] + ";" + timestamp, 100, '/', rootDomain);
	}

	this.idBreadcrumb = 		'breadcrumb';
	this.idBreadcrumbSection = 	'breadcrumbSection';
	this.v_breadcrumb =			[];
	this.url_home =				'';
	this.s_hometxt = 			BREADSECTION["home"];
	this.i_characterLimit =			80;

	//version
	this.version =				1.0;				//modificar version al crear un nuevo metodo
	this.setVersion(this.version, 'PrivaliaBaseBreadcrumb');

	},
	/**
	 * Construir y mostrar el breadcrumb
	 */
	buildBreadcrumb: function(){
		var cssJsonActual = this.getCssJson();
		this.setCssJson('jsonBread');

		//TODO: crear un metodo para comprobar si estamos en la parte publica o privada de la web
		if ($('page').hasClassName('public')){
			this.url_home = URL_DOMAIN+'/public/index';
		}
		else{
			this.url_home = URL_DOMAIN+'/microsites/index';
		}

		//generamos la plantilla de la cual partiremos con la seccion home
		var tplHtml = new Template(TPL_BREAD_FIRSTSECTION);
		html = tplHtml.evaluate({
			title: this.url_home,
			name: this.s_hometxt
		});
		//plantilla de las secciones intermedias
		sectionTpl = new Template(TPL_BREAD_SECTION);
		//plantilla de las ultima seccion
		lastSectionTpl = new Template(TPL_BREAD_LASTSECTION);

		// recorrer vector con las secciones del breadcrumb
		for(i = 0 ; this.v_breadcrumb.length > i ; i++) {
			section = this.v_breadcrumb[i];
			if (i==this.v_breadcrumb.length-1){		 //comprobamos si es el ultimo elemento
				html += lastSectionTpl.evaluate(section);
			}
			else{
				html += sectionTpl.evaluate(section);
			}
			// TODO: se intentara optimizar  con una expresion regular que haga los tres replace
			html = html.replace(/<br>/gi,' ').replace(/<br\/>/gi,' ').replace(/<br \/>/gi,' ');
		}

		// montar el html
		$(this.idBreadcrumb).update(html);

		this.setExtraLinks();

		// aplicamos cufon una vez montado el html
		//Cufon.replace('#'+this.idBreadcrumb);

		// mostramos la UL
		$(this.idBreadcrumbSection).show();

		this.setCssJson(cssJsonActual);

		this.v_breadcrumb =	[];

		//Truncamos el texto del ultimo elemento del breadcrumb en caso necesario
		this.setTruncate(this.i_characterLimit);
	},

	/**
	 * vamos anyadiendo las secciones al array del breadcrumb
	 */
	setSection: function(json_section){
		this.v_breadcrumb.push(json_section);
	},

	/**
	 * para cada elemento del array obtenido dinamicamente lo anyadimos al array del breadcrumb
	 */
	setSections: function (v_sections) {
		v_sections.each(this.setSection.bind(this));
	},

	/**
	 * Breadcrumb - Metodo de cambia extensiones de texto por ... cuando convenga
	 * numberCharacters - Limite de caracteres
	 */
	setTruncate: function (numberCharacters){
		var v_textToTruncate = $$('.truncateMe');
		if (v_textToTruncate.length > 0 ){
			v_textToTruncate.each(function(item) {
				var text = item.innerHTML;
				if (text.length > numberCharacters){
					text = text.substring(0, numberCharacters);
					text = text.replace(/\w+$/, '');

					text += '<a href="#" ' + 'onclick="this.parentNode.innerHTML=' +
					      'unescape(\''+escape(item.innerHTML)+'\');return false;">' +
					      '...<\/a>';

					$(item).update(text);
				}
			});
		}
	},

	/**
	 * Obtener los datos dinamicos para el breadcrumb
	 */
	getDataBreadcrumb: function(data){
		if(!Object.isUndefined(data.breadcrumb_data)) {
			// obtener datos recibidos por ajax
			vOptions = data.breadcrumb_data;
			// guardamos las secciones
			this.setSections(vOptions);
		}
	}

});


/**
 * PrivaliaBase - Common
 * =========================================
 * @modified: 	Lucas (21-06-11)
 */
var PrivaliaBase = Class.create(PrivaliaBaseBreadcrumb, {
	initialize: function($super) {
		$super();

		this.errId =				'90';

		this.cssInputIe = 			'_input_ie';

		this.i_thumbIn_sec =		0.4;
		this.i_thumbOut_sec =		0.3;

		this.limitAvailability =	5;					// limite de cuando quede disponible dicha cantidad o menos, hay que reforzar el numero con texto "quedan 2"
		this.limitMaxQuantity =		5;					// limite de cantidad a escoger de un producto
		this.s_thumbnailTooltip =	'';					// thumbnail actual usandose en el tooltip para ver un thumbnail mas grande
		this.vAvailabilityStatus =	[];
		this.vCollectionTime =		[];					// array para introducir los horarios de recogida de las devoluciones
		this.v_ordLines =			[];
		this.v_sizeQuantity =		[];					// array que guarda la relacion talla - cantidad disponible

		this.v_txt =				[];					// array para guardar traducciones de texto

		// flags from PrivaliaCoreErrors
		this.debug =				false;				// IMPORTANTE: Esto ha de estar en FALSE para produccion!!!!!

		// flags from PrivaliaCoreUI
		this.closeAfterSubmit =		false;				// cerrar el formulario tras realizar un submit exitoso
		this.b_scrollToNotify =		false;				// al mostrar una notificacion, scrolear al mensaje
		this.showLoad =				true;				// permitir el modo cargando
		this.b_trackSite = 			Country.getTracking();			// trackear la pagina usando privalia.analytics.js
		// flags from PrivaliaCoreJson
		this.reloadData =			true;				// actualizar datos tras realizar un submit exitoso

		// urls
		this.url_microsites =		URL_DOMAIN + '/microsites/index/';		// escaparate
		this.url_orderview =		URL_DOMAIN + '/myaccount/orderview';

		// TODO: Para desarrollo! Quitar esto en produccion
		this.startMode();

		//version
		this.version =				5.2;				//modificar version al crear un nuevo metodo
		this.setVersion(this.version, 'PrivaliaBase');
	},

	/**
	 * Global - Elimina los retornos de carro
	 * @param {Object} string
	 */
	brCleaner: function(string){
		return string.replace(/<br>/gi,' ').replace(/<br\/>/gi,' ').replace(/<br \/>/gi,' ');
	},

	/**
	 * Url correspondiente al log del chat
	 */
	callAddMemberChatSession: function (){

		// Construye la url para el log del chat, siendo this.urlSection por ej. http://it.privalia.loc/microsites/ y this.campaignPK el numero de campana
		var url = this.urlSection + "addMemberChatSession/campaign/" + this.campaignPK;
		params = {
			method:'post',
			onFailure: 	function ()	// ERROR CONTROL
			{
				this.errorMessage('01');
			}
		};
		new Ajax.Request(url,params);
	},

	/**
	 * Comprueba si se esta accediendo a la web mediante un dispositivo diferente a un ordenador
	 */
	checkUserAgent: function(agent) {
		// recogemos y pasamos el useragent a minusculas para evitar el key sensitive
		var s_agent = navigator.userAgent.toLowerCase();

		// busca el useragent, si es diferente de -1 es que existe sino no existe
		// indexOf por defecto devuelve la posicion que ocupa la palabra en la string que la contiene si coincide el useragent
		if(s_agent.indexOf(agent)!= -1){
			return s_agent;
		}
    },


	/**
	 * Funcion que borra los imputs del formulario
	 * @param {Object} idForm
	 */
	clearForm: function(idForm){
    	if(idForm != '' && $(idForm) != null){
			var inputs = $(idForm).getElements();
			inputs.each(function(item){
				item.clear();
			});
    	}
	},

	clearValue: function(id){
		if(id != '' && $(id) != null){
			$(id).value = '';
		}
	},

    /**
	 * Alimenar el select de rango de dias para devoluciones
	 */
	feedSelectDates: function (range, target) {
		var built = '<option value=\"0\"></option>';
		var tpl = 	new Template(TPL_SELECT);

		range.each(function(item) {
			var css = "";
			var selected = '';

			option = {
				label: 		item,
				value: 		item
			};

			built += tpl.evaluate(option);
		},this);

		if(built != '' && target !== undefined) {
			$(target).insert({bottom:built});
		}
		return built;
	},

	/**
	 * Alimenar el select de cantidad para newreturn
	 */
	feedSelectQuantity: function (quantity, selectedId, target) {
		var built = '';
		var tpl = 	new Template(TPL_SELECT);

		for (i=1; i<=quantity; i++){
			var css = '';
			var selected = '';
			var label ='';

			option = {
				label: 		i,
				value: 		i,
				selected: 	selected,
				css: 		css
			};

			built += tpl.evaluate(option);
		}

		if(built != '' && target !== undefined) {
			$(target).insert({bottom:built});
		}

		return built;
	},

	/**
	 * Alimenar el select de cambiar talla dando los valores en un array de json
	 * @param [arraySizes], default-selected-option, id-del-select
	 */
	feedSelectSize: function (arraySizes, selectedId, target) {
		var built = '';
		var tpl = 	new Template(TPL_SELECT);

		arraySizes.each(function(opt1) {
			var css = "";
			var disabled = "";
			var label = this._getLabelSelectSize(opt1);
			var quantity = this._getQuantitySelectSize(opt1);

			// detectar el valor preseleccionado
			if(opt1.stockp_PK == selectedId || opt1.prodf_websize == selectedId) {
				selected = 'selected="selected"';
			}
			else {
				selected = '';
			}

			// comprueba la disponibilidad de la talla, si tiene 5 o menos, hay que mostrarlo
			if(quantity <= this.limitAvailability) {
				label = label + " -- " + this.getAvailability(quantity);
			}

			// si la disponibilidad es 0, agregar estilo css "exhausted". nos servira para marcarlo el caso de agotado
			if(quantity === 0) {
				css = "exhausted";
				disabled ="disabled";
			}

			option = {
				disabled: 	disabled,
				label: 		label,
				value: 		opt1.stockp_PK,
				selected: selected,
				css: 		css
			};
			built += tpl.evaluate(option);

			this.setSizeQuantity(opt1.stockp_PK, quantity);
		}, this);

		if(built !== '' && target !== undefined) {
			$(target).insert({bottom:built});
		}

		return built;
	},

	/**
	 * Dado el ID de tipo de direccion, devuelve el label
	 * Puede ser OFICINA=1 o PARTICULAR=2
	 */
	getAddressType: function (i_idType) {
		var s_type  = "";

		if(i_idType == 1) {
			s_type = this.getTxt("office");
		}
		else if(i_idType == 2) {
			s_type = this.getTxt("home");
		}

		return s_type;
	},

	/**
	 * Retorna todo el array de la relacion tallas - cantidad disponible
	 */
	getAllSizeQuantity: function () {
		return this.v_sizeQuantity;
	},

	/**
	 * Obtiene la disponibilidad de los productos en formato texto a partir del numero restante de productos
	 */
	getAvailability: function (availability) {
		if(availability > 0){
			if(availability <= this.limitAvailability){
				if(availability == 1){
					res = "<span class=\"clr-orange\">"+this.vAvailabilityStatus["isavailable"] +"&nbsp;"+ availability+"</span>";
				}else{
					res = "<span class=\"clr-orange\">"+this.vAvailabilityStatus["areavailable"] +"&nbsp;"+ availability+"</span>";
				}
			}
			else{
				res = this.vAvailabilityStatus["available"];
			}
		}else{
			res = "<span class=\"clr-red\">"+this.vAvailabilityStatus["exhausted"]+"</span>";
		}

		return res;
	},

	/**
	 * Obtiene la disponibilidad de los productos en formato estilo-css a partir del numero restante de productos
	 * TODO: Marcos - Deprecated
	 */
	getAvailabilityStyle: function (availability) {
		if(availability > 0){
			if(availability <= this.limitAvailability){
				res = "box-left";
			}
			else{
				res = "box-available";
			}
		}else{
			res = "box-unavailable";
		}

		return res;
	},


	/**
	 * Recoge la PK de la campanya de la url actual
	 * TODO: hay que optimizar esta funcion usando el getUrlParamValue()
	 */
	getCampaign: function(){
		// recogemos la url
		var url = this.getUrl().toLowerCase();
		// nos quedamos con la parte de la pk de campanya
		var campaign = url.split("/")[6];
		if(campaign != null){
			return campaign;
		}
	},

	/**
	 * Obtiene la disponibilidad horaria de los usuarios a la hora de realizar una devolucion
	 */
	getCollectionTime: function (availability) {

		if(availability ==1){
			res = this.vCollectionTime["morning"];
		}else{
			res = this.vCollectionTime["afternoon"];
		}
		return res;
	},

	/**
	 * Generar select con datos obtenidos por ajax
	 */
	getDataSelect: function(target, urlProvider) {
		if(target != '' && TPL_SELECT != '') {
			switch(target) {
				// tipo de direccion
				case 'memaddress_adtype':
					url = '/select/getAddressTypes/';
					break;

				// tipo de calles
				case 'memaddress_street_number_type':
					url = '/select/getNumberTypes/';
					break;

				// tipo de calles
				case 'memaddress_street_type':
					url = '/select/getStreetTypes/';
					break;

				// proveedores de correo
				case 'provider':
					url = '/select/getContactProviders/';
					break;

				default:
					url = urlProvider;
			}

			if(url != '') {
				// llamada URL ajax para obtener select de datos
				new Ajax.Request(url, {
					onComplete: (function(response) {
						this.parseResponse(response);
						if(this.statusOK()) {
							data = Object.values(this.getResData());
							this.feedSelect(target, data[0]);
						}
					}).bind(this),
					onFailure: (function() {
						this.stopLoad();
						this.errorMessage('05');
					}).bind(this)
				});
			}
		}
	},
	/**
	 * Metodo que transforma segundos en dias, horas, minutos y segundos
	 * @param {Object} seconds - input de segundos
	 * @param {Object} daysRequired - 0 para resultado sin dias, 1 para resultado con dias
	 */
	getExpiresTime: function(seconds, daysAndHoursRequired){
		var timeInDays = '',
		numdays = Math.floor(seconds / 86400), // Dias
		numhours = 0,
		numminutes = 0,
		numseconds = ((seconds % 86400) % 3600) % 60; // Segundos

		// Horas
		if(Math.floor((seconds % 86400) / 3600) < 10){
			numhours = "0" + Math.floor((seconds % 86400) / 3600);
		}else{
			numhours = Math.floor((seconds % 86400) / 3600);
		};
		// Minutos
		if(Math.floor(((seconds % 86400) % 3600) / 60) < 10 ){
			numminutes = "0" + Math.floor(((seconds % 86400) % 3600) / 60);
		}else{
			numminutes = Math.floor(((seconds % 86400) % 3600) / 60);
		}

		// Volcado, diferenciando si se requieren dias y horas
		if (daysAndHoursRequired == 1){
			if (numdays == 1){
				timeInDays += numdays + ' ' + this.getTxt('day') + ', ' + numhours + this.getTxt('h');
			}else if(numdays != 0){
				timeInDays += numdays + ' ' + this.getTxt('days')+', ' + numhours + this.getTxt('h');
			}else{
				timeInDays += numhours + this.getTxt('h');
			}
			return	timeInDays += ' ' + numminutes + this.getTxt('min');
		}else{
		return	timeInDays +=  numminutes +":"+ numseconds;
		}
	},
	/**
	 * Devuelve si la campanya actual es para adultos en booleano
	 * @param {Object} data - datos del JSON
	 */
	getIsAdultCampaign: function(data){
		if (data.campaign_data !== undefined){
			var result = (data.campaign_data.campaign_adult ? true : false);
		} else {
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaBase@getIsAdultCampaign: data.campaign_data not found');
			}
		}
		return result;
	},

	/**
	 * Devuelve la cantidad disponible de una talla
	 */
	getSizeQuantity: function (idSize) {
		return this.v_sizeQuantity[idSize];
	},

	/**
	 * Obtener traduccion de un texto
	 */
	getTxt: function(text) {
		return this.v_txt[text];
	},

	/**
	 * Devuelve texto segun la cantidad 
	 * @param {number} 
	 * @param {string}
	 * @param {string}
	 */
	getTxtPlural: function (nQuantity, sTxtSingular, sTxtPlural) {		
		var sTxt  = "";
		if(nQuantity > 1) {			
			sTxt = "&nbsp;" + sTxtPlural;
		}
		else {		
			sTxt = "&nbsp;" + sTxtSingular;
		}
		return sTxt;
	},
	/**
	 * Separa la url en sus diferentes secciones
	 */
	getWebSections:function(){
		// volcamos la url entera
		var s_url = this.getUrl().toLowerCase();
 		// Recogemos la array de secciones
 		var v_rawUrl = s_url.split("/");
 		// ejemplo de resultado: [0]= http, [1]='', [2]= es.privalia.com, [3]= public, [4]= index, etc...
 		return v_rawUrl;
     },

     /**
  	* Obtener el valor de un parametro pasado por URL.
  	* El formato de URL que es capaz de interpretar es:
  	* www.dominio.com/param1/value1/param2/value2
  	*/
	getUrlParamValue: function (param, url) {
    	 var value = '';

    	 if(param != '') {
    		 // url es opcional. si no nos lo especifican, obtener la url del navegador
	    	 if(arguments.length == 1) {
	    		 url = this.getUrl().toLowerCase();
	    	 }

	    	 // spliteamos hasta obtener el valor deseado
	    	 v_tmp = url.split(param + "/");
	    	 if((v_tmp.length >0) && (v_tmp[1] !== undefined) ) {
	    		 value = v_tmp[1].split("/")[0];
	    		 value = value.split("#")[0];
	    	 }
    	 }

    	 return value;
     },


	/**
	 * Guarda en sesion el orderPK (id del pedido)
	 * y automaticamente redirige al detalle de pedido
	 */
	goToOrder: function(idpk) {
		if(idpk != '') {
			var url = '/myaccount/setorder/order/' + idpk;
			new Ajax.Request(url, {
				onComplete: this.redirectToOrderView.bind(this),

				onFailure: (function() {
					this.errorMessage('03');
				}).bind(this),
				onException: (function() {
					this.errorMessage('04');
				}).bind(this)
			});
		}
	},

	/**
	 * Comprobamos si se tiene alguna promocion descuento para esta compra
	 * (existe un hasDiscountPromo en privalia.myaccount.js)
	 */
	hasDiscountPromo: function(section) {
		var b_discountPromo = false;
			switch(section) {
				case 'summary':
					if (this.getResData().marketing_promotions && this.getResData().marketing_promotions.size() > 0){
						b_discountPromo = true;
					}
				break;
				case 'orderview':
				case 'confirmation':
					if(this.getResData().order_pricing.order_discount){
						var s_orderDiscount = this.getResData().order_pricing.order_discount;
						var s_value = Country.extractValue(s_orderDiscount);
						//comprovamos si el valor del cheque no es 0,00 ni 0.00 (mex)
						if (s_value != '0,00' && s_value != '0.00'){
							b_discountPromo = true;
						}
					}
				break;
				case 'vouchers':
					if (this.getResData().promotions_data && this.getResData().promotions_data.size() > 0){
						b_discountPromo = true;
					}
					break;
			}

			return b_discountPromo;
	},

	/**
	 * Oculta una seccion con efecto tipo fade-out y mostrar otra con efecto tipo fade-in
	 */
	hideAndShow: function(hideId, showId, hide2Id) {
		// id a ocultar
		if(hideId != null){
			Effect.toggle(hideId, 'appear', { duration: 0.2 });
		}
		// id a mostrar en caso de que se pase algun valor
		if(hide2Id != null){
			Effect.toggle(hide2Id, 'appear', { duration: 0.2 });
		}
		// id a mostrar
		if(showId != null){
			Effect.toggle(showId, 'appear', { duration: 0.2 });
		}
	},

	/**
	 * ocultar tooltip de thumbnails con animacion
	 */
	hideThumbnailTooltip: function (item, idTooltip) {
		if(idTooltip != '') {
			var v_coords = $(item).positionedOffset(); 			// obtenemos las coordenadas del thumbnail
			var i_xMoved = 70;
			var i_x = v_coords.left;
			var i_y = v_coords.top - 100;

			// animacion para ocultar el tooltip
			new Effect.Move(idTooltip, {	// opciones del efecto de movimiento del menuflow
				x: (i_x + i_xMoved),
		        y: i_y,
				mode: 'absolute',
				transition: Effect.Transitions.sinoidal,
				duration: this.i_thumbOut_sec
	        });
			new Effect.Opacity(idTooltip, {duration: this.i_thumbOut_sec, from: 1, to: 0})
			new Effect.Opacity(item, {duration: this.i_thumbOut_sec, from: 0.3, to: 1})
		}
	},

	/**
	 * determina si es un numero entero
	 */
	isInteger: function (s) {
	  return (s.toString().search(/^-?[0-9]+$/) == 0);
	},
	/**
	 * Carga dinamicamente un script alojado en un fichero
	 * @param {Object} url - url del .js a cargar
	 */
	loadScript: function (url){
		var script = document.createElement("script");
		script.type = "text/javascript";
		script.src = url;
		document.body.appendChild(script);
	},
	/**
	 * Carga dinamicamente un script inline
	 * @param {Object} code - codigo del script
	 */
	loadScriptString: function (code){
		var script = document.createElement('script');
		script.type = 'text/javascript';
		try {
			script.appendChild(document.createTextNode(code));
		} catch (ex){
			script.text = code;
		}
		document.body.appendChild(script);
	},
	/**
	 * Carga dinamicamente un script alojado en un fichero
	 * @param {Object} url - url del .js a cargar
	 */
	loadScript: function (url){
		var script = document.createElement("script");
		script.type = "text/javascript";
		script.src = url;
		document.body.appendChild(script);
	},
	/**
	 * Proceso para quitar las comillas de una cadena (especifico para el control de links convertibles en combos)
	 */
	noQuotes: function(item){
		// solo quita la del principio
		var linkId = item.replace("'", "");
		// divide la cadena con la comilla final
		linkId = linkId.split("'");
		// nos quedamos con la cadena sin comillas
		linkId = linkId[0];

		return linkId
	},

	/**
	 * Prepara los title de los select de la fecha de nacimiento para poder recibir los valores
	 */
	prepareMemberBirthData: function() {
		var prefix = 'member_birth';
		input = prefix+'day';
		this.setInputTitle(input,'#{'+input+'}');
		input = prefix+'month';
		this.setInputTitle(input,'#{'+input+'}');
		input = prefix+'year';
		this.setInputTitle(input,'#{'+input+'}');
	},

	/**
	 * Sirve para solucionar el problema de volcar datos dinamicos JS en inputs y selects.
	 * BUGFIX IE
	 */
	putValuesInputIE: function () {
		$$('input.' + this.cssJson + this.cssInputIe).each(function(item){
			if($(item.id + this.cssInputIe) != null){
			value = $(item.id + this.cssInputIe).innerHTML;
			$(item).value = value;
			}
		},this);
		$$('select.' + this.cssJson + this.cssInputIe).each(function(item){
			if($(item.id + this.cssInputIe) != null){
			value = $(item.id + this.cssInputIe).innerHTML;
			$(item).title = value;
			}
		},this);
	},

	/**
	 * Redirige al escaparate
	 */
	redirectToMicrosites: function () {
		this.load();
		document.location.href = this.url_microsites;
	},

	/**
	 * resetear el array que guarda la info de la disponibilidad de cada producto
	 */
	resetSizesOrderLines: function () {
		// vacio array
		this.v_ordLines.clear();
	},

	/**
	 * Redirige a la pagina detalle de pedido
	 */
	redirectToOrderView: function() {
		document.location.href = this.url_orderview;
	},


	/**
     * Controla el tiempo en que se tiene que realizar una accion
     */
    setActionTimeOut: function(method, seconds){
        timer = window.setTimeout(method, seconds * 1000);
        return timer;
    },

	/**
	 * Asigna todo el array de la relacion tallas - cantidad disponible
	 * @author mike
	 */
	setAllSizeQuantity: function (array) {
		this.v_sizeQuantity = array;
	},

	/**
	 * Fija los textos que han de mostrarse en la variable correspondiente a la disponibilidad de productos
	 */
	setAvailabilityTxt: function(idAvailability, txt) {
		this.vAvailabilityStatus[idAvailability] = txt;
	},

	/**
	 * Inserta el chat
	 */
	setChatSession: function(sectionUrl, campPK, country, protocol, name, mail){

		// Conecta al chat externo de ISL pasando parametros correspondientes a datos de usuario
		var scriptUrl = protocol + '://islpronto.islonline.net/live/islpronto/public/chat.js?d=privalia-'+ country +'&lang='+ country +'&nick=' + name + '&customfields=email:Email&customfield_email=' + mail;

		// Insertamos el script almacenado en la variable scriptUrl a posteriori para que no sea machacada en el proceso de carga
		$('chat_data').insert({
			before: new Element('script', {
				src: scriptUrl
			})
		});
	},

	/**
	 * Fija los textos que han de mostrarse en la variable correspondiente a la disponibilidad horaria de los usuarios
	 */
	setCollectionTimeTxt: function(idTime, txt) {
		this.vCollectionTime[idTime] = txt;
	},


	/**
	 * En funcion de la talla seleccionada en el combo Talla, generar el combo de cantidad (con cantidad max disponible)
	 */
	setSelectQuantity: function (idSelectSize, idSelectQuantity, defaultTxt, extraQuantity) {
		if(idSelectSize != '' && idSelectQuantity != '') {
			var quantity = 		this.getSizeQuantity($F(idSelectSize));
			var html = 			'';
			var tpl = 			new Template(TPL_SELECT); // TPL_SELECT definido en global.js

			// utilizado en la lista de productos del SUMMARY
			if(extraQuantity !== undefined) {
				// Sumamos a la disponibilidad de talla, los que tenemos seleccionados (esta suma da el total de stock disponible)
				quantity += extraQuantity;
			}

			// si la cantidad disponible de la talla es menor que la cantidad por defecto (5), entonces regenerar el combo
			if(quantity < this.limitMaxQuantity) {

				// opcion de poder poner una opcion por defecto (pasando texto con defaultTxt)
				if(defaultTxt !== undefined && defaultTxt != '') {
					option = {
							label: defaultTxt,
							value: ''
						};
						html += tpl.evaluate(option);
				}

				for(i = 1 ; i <= quantity ; i++) {
					option = {
						label: i,
						value: i
					};
					html += tpl.evaluate(option);
				}
				if(html != '') {
					$(idSelectQuantity).update(html);
				}
			}
			else {
				//Si existe el cuarto parametro
				if(!Object.isUndefined(extraQuantity)){
					if(extraQuantity > this.limitMaxQuantity) {

						for(i = 1 ; i <= extraQuantity; i++) {
							option = {
								label: i,
								value: i
							};
							html += tpl.evaluate(option);
						}
						if(html != '') {
							$(idSelectQuantity).update(html);
						}
					}
				}else{

					// opcion de poder poner una opcion por defecto (pasando texto con defaultTxt)
					if(defaultTxt !== undefined && defaultTxt != '') {
						option = {
								label: defaultTxt,
								value: ''
							};
							html += tpl.evaluate(option);
					}

					// Si la cantidad disponible es mayor que la cantidad por defecto (5), regeneramos el combo
					for(i = 1 ; i <= this.limitMaxQuantity ; i++) {
						option = {
							label: i,
							value: i
						};
						html += tpl.evaluate(option);
					}
					if(html != '') {
						$(idSelectQuantity).update(html);
					}
				}
			}
		}
	},

	/**
	 * TODO: Comentar
	 * @param {Object} stockPK
	 * @param {Object} quantity
	 */
	setSizesOrderLines: function (stockPK, quantity) {
		this.v_ordLines.push({
			stockPK: 	stockPK,
			quantity: 	quantity
		});
	},

	/**
	 * Guardar cantidad disponible de una talla
	 */
	setSizeQuantity: function (idSize, quantity) {
		this.v_sizeQuantity[idSize] = quantity;
	},

	/**
	 * Definir y guardar la traduccion de un texto
	 */
	setTxt: function(text, translation) {
		this.v_txt[text] = translation;
	},

	/**
	 * aplicar tooltip a thumbnails de productos para ver ampliado
	 */
	setThumbnailTooltip: function () {
		var idTooltipThumb = 'tooltip-thumbnail';		// div del modal que hara de tooltip

		$$('.tooltip-thumb').each(function (item) {
			$(item).observe('mouseover', (function() {
				if(item.src != this.s_thumbnailTooltip) {
					// pillamos path de la img thumbnail
					this.s_thumbnailTooltip = item.src;

					// quitamos el "tn" para obtener el path de la imagen que es mas grande
					v_tmp = this.s_thumbnailTooltip.split("tn");
					s_imgPath = v_tmp.join("");

					// cargamos img en el tooltip
					$(idTooltipThumb + '-big').src = s_imgPath;

					// mostramos tooltip de thumbnails con animacion
					this.showThumbnailTooltip(item, idTooltipThumb);
				}
			}).bind(this));

			$(item).observe('mouseout', (function() {
				// ocultamos tooltip de thumbnails con animacion
				this.hideThumbnailTooltip(item, idTooltipThumb);

				this.s_thumbnailTooltip = '';
			}).bind(this));
		}, this);
	},

	/**
	 * mostrar tooltip de thumbnails con animacion
	 */
	showThumbnailTooltip: function (item, idTooltip) {
		if(idTooltip != '') {
			var v_coords = $(item).positionedOffset(); 			// obtenemos las coordenadas del thumbnail
			var i_xMoved = 70;
			var i_x = v_coords.left;
			var i_y = v_coords.top - 100;

			// colocamos el tooltip a la derecha del thumbnail y centrado
			$(idTooltip).setStyle({
				position: 'absolute',
				left: (i_x + i_xMoved) + 'px',
				top:  i_y + 'px',
				zIndex: '100'
			});

			// animacion para mostrar el tooltip
			$(idTooltip).setOpacity(0);
			$(idTooltip).show();
			new Effect.Opacity(idTooltip, {duration: this.i_thumbIn_sec, from: 0, to: 1})
			new Effect.Move(idTooltip, {	// opciones del efecto de movimiento del menuflow
		      x: (i_x + i_xMoved - 10),
		      y: i_y,
		      mode: 'absolute',
		      transition: Effect.Transitions.sinoidal,
		      duration: this.i_thumbIn_sec
		    });
			new Effect.Opacity(item, {duration: this.i_thumbIn_sec, from: 1, to: 0.3})
		}
	},

	 /**
	 * Remplazar comillas dobles por simples y todos los tags <html>
	 */
	replaceQuotesAndHtmlTags: function (s_cad) {
		s_cad = s_cad.replace(/["]/gi,"'");
		s_cad = s_cad.replace(/<.*?>/gi," ");
		return s_cad;
	},
	
	 /**
     * Transfiere los datos json obtenidos a otro objeto
     */
    transferData: function (ObjTarget) {
    	ObjTarget.setResData(this.res_data);
    	return ObjTarget;
    },

	/**
	 * Elimina los espacios en blanco que puedan existir
	 * @param {Object} str
	 */
	trim: function(str){ return str.replace(/^\s+|\s+$/g,'') },

    /**
     * Hacer un $.update() pero todoterreno. En algun caso (fantasma) hemos detectado que el update
     * normal no acaba de chutar en IE7. Este update si es capaz de hacerlo.
     */
    updateRover: function (id, content) {
    	$(id).update('');
        $(id).insert(content);
    },

	_getLabelSelectSize: function (option) {
		var label = option.prodf_websize;
		return label;
	},

	_getQuantitySelectSize: function (option) {
		var quantity = option.quantity;
		return quantity;
	}
});

/**
 *  92-privalia.trackingstatus.js - Common
 * =========================================
 * @requieres: 	protoaculous.1.8.3.min.js, protoload.js
 * @revision: 	1.0
 */


/**
 * PrivaliaTrackingStatus Common
 * =========================================
 * @modified:     Cristina	(17-05-11)
 */
var PrivaliaTrackingStatus = Class.create(PrivaliaBase, {
  initialize: function($super){
        $super();

        this.v_orderStatus = 					[];			// array que recoge los titulos de estado para el listado de pedidos y listado de devoluciones
        this.v_orderStatusDescription = 		[];			// array que recoge el texto descriptivo en estado de pedido y estado de devoluciones
        
      //version 
    	this.version =				1.1;				//modificar version al crear un nuevo metodo
    	this.setVersion(this.version, 'PrivaliaTrackingStatus');

    },

    /**
     * Cambia el estado del tracking a cancelado y lo muestra mediante el sprite y textos
     */
    changeStatusTrackCancel: function(){
    	// cambia el sprite al estado cancelado
    	if($('tracking') != null) {
    		$('tracking').removeClassName('trk-status1');
    		$('tracking').addClassName('trk-status1-1');
    	}
        // cambia el titulo del estado en el sprite a cancelado
        var title = this.setOrderStatusList('1-1',this.i_service);
        var opencampaign = $$('.opencampaign');
        opencampaign.each(function(item){
            item.update(title);
        });

        // cambia el texto descriptivo del estado a cancelado
        var text = this.setOrderStatus('1-1',this.i_service, 'cancel').tracking_text;
        $('tracking_text').update(text);

        // Mostrar mensaje de OK cancelcacion realizada correctamente
        this.notify(this.getResTextcodes());
    },

    /**
     * Controla si un objeto que contenga el ultimo getData esta vacio, en ese caso vuelve a pasar los valores getData
     */
    checkIfDataIsUndefined: function(data){
    	if(data == undefined){
    		var data = this.getResData();
    		return data;
    	}
    },

    /**
     * Devuelve un integer que corresponde al tipo de carrier
     */
    getStatusCarrier: function(){
      return this.getResData().order_status.ordstatus_carrier;
    },

    /**
     * Obtiene la id del tracking, hace referencia al status del tracking pero no es le mismo codigo
     */
    getStatusPK: function(){
      return this.getResData().order_status.ordstatus_PK;
    },

    /**
     * Obtener numero de estado del tracking de pedido
     */
    getStatusTracking: function(){
        return this.getResData().order_status.ordstatus_tracking;
    },

    /**
     * Anyade la clase que aplica el sprite correspondiente segun carrier
     */
    setCarrierClass: function(carrier){
    	if ($('tracking') != null){
    		$('tracking').addClassName(carrier);
    	}
    },


    //	LISTADO DE PEDIDOS	//

    /**
     * 	En funcion del estado(ordstatus_tracking) del pedido mostramos una descripcion en listado de pedidos
     */
    setOrderStatusList: function (i_ordstatusTracking, i_isService, target) {
      // DEVOLUFACIL //

        if (target === "returns_data"){
          // aplicamos equivalencias para aprovechar el metodo
          if (i_ordstatusTracking == '1'){ i_ordstatusTracking = '6-1';}
          if (i_ordstatusTracking == '1-1'){ i_ordstatusTracking = '6-4';}
          if (i_ordstatusTracking == '2'){ i_ordstatusTracking = '6-2';}
          if (i_ordstatusTracking == '3'){ i_ordstatusTracking = '6-3';}
        }

      // PEDIDOS - productos y servicios //
		var s_orderStatus;	
      switch (i_ordstatusTracking) {
            case '0':
                s_orderStatus = this.v_orderStatus["dev-curso"];
                break;
            case '1':
              if(i_isService == 1){
                s_orderStatus = this.v_orderStatus["serv_abierto"];
              }
              else{
                s_orderStatus = this.v_orderStatus["abierto"];
              }
                break;
            case '1-1':
              if(i_isService == 1){
                s_orderStatus = this.v_orderStatus["serv_cancelado"];
              }
              else{
                s_orderStatus = this.v_orderStatus["cancelado"];
              }
                break;
            case '2':
              if(i_isService == 1){
                s_orderStatus = this.v_orderStatus["serv_confirmado"];
              }
              else{
                s_orderStatus = this.v_orderStatus["pendiente"];
              }
                break;
            // inicio solo servicios
            case '2-1':
              if(i_isService == 1){
                s_orderStatus = this.v_orderStatus["serv_existencias"];
              }
                break;
            // fin solo servicios
            case '3':
              if(i_isService == 1){
                s_orderStatus = this.v_orderStatus["serv_cerrado"];
              }
              else{
                s_orderStatus = this.v_orderStatus["almacen"];
              }
                break;
            case '3-1':
                s_orderStatus = this.v_orderStatus["existencias"];
                break;
            case '4':
                s_orderStatus = this.v_orderStatus["reparto"];
                break;
            case '4-1':
                s_orderStatus = this.v_orderStatus["perdido"];
                break;
            case '4-2':
          s_orderStatus = this.v_orderStatus["devuelto"];
                break;
            // inicio solo kiala
            case '5':
                s_orderStatus = this.v_orderStatus["kia_recogida"];
                break;
            case '5-1':
          s_orderStatus = this.v_orderStatus["kia_devuelto"];
                break;
            case '5-2':
          s_orderStatus = this.v_orderStatus["kia_reembolsado"];
                break;
            // fin solo kiala
            case '6':
                s_orderStatus = this.v_orderStatus["entregado"];
                break;
            case '6-1':
                s_orderStatus = this.v_orderStatus["dev-curso"];
                break;
            case '6-2':
                s_orderStatus = this.v_orderStatus["dev-revisando"];
                break;
            case '6-3':
                s_orderStatus = this.v_orderStatus["dev-reembolsada"];
                break;
            case '6-4':
                s_orderStatus = this.v_orderStatus["dev-cancelada"];
                break;
            default:
                break;
        }
        // estado para el listado de pedidos
        return s_orderStatus;
    },


    //	 Estado de pedido	//

    /**
     * 	En funcion del estado(ordstatus_tracking) del pedido mostramos una descripcion del estado de un pedido
     *  Muestra para el tracking de productos - servicios - devolufacil
     */
    setOrderStatus: function (i_ordstatusTracking, i_isService, target, dataJson) {

    // si el target es cancel es que se esta concelando un pedido activo y tenemos que saltarnos todos los pasos que
   	// contiene esta condicion
    if(target !== 'cancel'){

    // DEVOLUFACIL //

      // recogemos la seccion
      var v_rawUrl = this.getWebSections();
      var url = v_rawUrl[3]+"/"+v_rawUrl[4];

      //TODO:  cambiar el control de seccion en caso de que sea un devolufacil y no utilizar el parametro url
      if (target == "order_status" && url == "myaccount/viewreturn"){
        // aplicamos equivalencias para aprovechar el metodo
          if (i_ordstatusTracking == '1'){ i_ordstatusTracking = '6-1';}
          if (i_ordstatusTracking == '1-1'){ i_ordstatusTracking = '6-4';}
          if (i_ordstatusTracking == '2'){ i_ordstatusTracking = '6-2';}
          if (i_ordstatusTracking == '3'){ i_ordstatusTracking = '6-3';}

        // definimos los valores por defecto
        dataJson.cancelled_open_title = this.v_orderStatus["dev-curso"];
        dataJson.collectedreturn_title = this.v_orderStatus["dev-revisando"];
        dataJson.refundreturn_title = this.v_orderStatus["dev-reembolsada"];
      }

    // PEDIDOS - productos y servicios //

      // Valores por defecto para los titulos de cada sprite y el texto
      if(i_isService == 1){
        dataJson.opencampaign_title = this.v_orderStatus["serv_abierto"];
        dataJson.waitingmerchandise_title = this.v_orderStatus["serv_confirmado"];
        dataJson.delivered_title = this.v_orderStatus["serv_cerrado"];
      }
      else
      {
          dataJson.opencampaign_title = this.v_orderStatus["abierto"];
          dataJson.waitingmerchandise_title = this.v_orderStatus["pendiente"];
          dataJson.inwarehouse_title = this.v_orderStatus["almacen"];
          dataJson.ondelivery_title = this.v_orderStatus["reparto"];
          dataJson.pickuppoint_title = this.v_orderStatus["kia_recogida"];
          dataJson.delivered_title = this.v_orderStatus["entregado"];
          dataJson.tracking_text = this.v_orderStatusDescription["abierto"];
      }

      // En caso de no ser Kiala
      if (dataJson.ordstatus_carrier != 30) {
              dataJson.pickuppoint_class = 'hidden';
      }
    }
    // si el target es cancel
    else{
    	var dataJson = this.checkIfDataIsUndefined(dataJson);
    }

      switch (i_ordstatusTracking) {
            case '0':
              dataJson.opencampaign_title = this.v_orderStatus["dev-curso"];
                break;
            case '1':
              if(i_isService == 1){
                dataJson.opencampaign_title = this.v_orderStatus["serv_abierto"];
                dataJson.tracking_text = this.v_orderStatusDescription["serv_abierto"];
              }
              else{
                dataJson.opencampaign_title = this.v_orderStatus["abierto"];
                dataJson.tracking_text = this.v_orderStatusDescription["abierto"];
              }
                break;
            case '1-1':
              if(i_isService == 1){
                dataJson.opencampaign_title = this.v_orderStatus["serv_cancelado"];
                dataJson.tracking_text = this.v_orderStatusDescription["serv_cancelado"];
              }
              else{
                dataJson.opencampaign_title = this.v_orderStatus["cancelado"];
                dataJson.tracking_text = this.v_orderStatusDescription["cancelado"];
              }
                break;
            case '2':
              if(i_isService == 1){
                dataJson.waitingmerchandise_title = this.v_orderStatus["serv_confirmado"];
                dataJson.tracking_text = this.v_orderStatusDescription["serv_confirmado"];
              }
              else{
                dataJson.waitingmerchandise_title = this.v_orderStatus["pendiente"];
                dataJson.tracking_text = this.v_orderStatusDescription["pendiente"];
              }
                break;
            case '2-1':
              // solo servicios
              if(i_isService == 1){
                dataJson.waitingmerchandise_title = this.v_orderStatus["serv_existencias"];
                dataJson.tracking_text = this.v_orderStatusDescription["serv_existencias"];
              }
                break;
            case '3':
              if(i_isService == 1){
                dataJson.delivered_title = this.v_orderStatus["serv_cerrado"];
                dataJson.tracking_text = this.v_orderStatusDescription["serv_cerrado"];
              }
              else{
                dataJson.inwarehouse_title = this.v_orderStatus["almacen"];
                dataJson.tracking_text = this.v_orderStatusDescription["almacen"];
              }
                break;
            case '3-1':
              dataJson.inwarehouse_title = this.v_orderStatus["existencias"];
              dataJson.tracking_text = this.v_orderStatusDescription["existencias"];
                break;
            case '4':
              dataJson.ondelivery_title = this.v_orderStatus["reparto"];
              dataJson.tracking_text = this.v_orderStatusDescription["reparto"];
                break;
            case '4-1':
              dataJson.ondelivery_title = this.v_orderStatus["perdido"];
              dataJson.tracking_text = this.v_orderStatusDescription["perdido"];
                break;
            case '4-2':
              dataJson.ondelivery_title = this.v_orderStatus["devuelto"];
              dataJson.tracking_text = this.v_orderStatusDescription["devuelto"];
                break;
            // inicio solo kiala
            case '5':
              dataJson.pickuppoint_title = this.v_orderStatus["kia_recogida"];
              dataJson.tracking_text = this.v_orderStatusDescription["kia_recogida"];
                break;
            case '5-1':
              dataJson.pickuppoint_title = this.v_orderStatus["kia_devuelto"];
              dataJson.tracking_text = this.v_orderStatusDescription["kia_devuelto"];
                break;
            case '5-2':
              dataJson.pickuppoint_title = this.v_orderStatus["kia_reembolsado"];
              dataJson.tracking_text = this.v_orderStatusDescription["kia_reembolsado"];
                break;
            // fin solo kiala
            case '6':
              dataJson.delivered_title = this.v_orderStatus["entregado"];
              dataJson.tracking_text = this.v_orderStatusDescription["entregado"];
                break;
            case '6-1':
              dataJson.cancelled_open_title = this.v_orderStatus["dev-curso"];
              dataJson.tracking_text = this.v_orderStatusDescription["dev-curso"];
                break;
            case '6-2':
              dataJson.collectedreturn_title = this.v_orderStatus["dev-revisando"];
              dataJson.tracking_text = this.v_orderStatusDescription["dev-revisando"];
                break;
            case '6-3':
              dataJson.refundreturn_title = this.v_orderStatus["dev-reembolsada"];
              dataJson.tracking_text = this.v_orderStatusDescription["dev-reembolsada"];
                break;
            case '6-4':
              dataJson.cancelled_open_title = this.v_orderStatus["dev-cancelada"];
              dataJson.tracking_text = this.v_orderStatusDescription["dev-cancelada"];
                break;
            default:
                break;
        }
      return dataJson;

    },

    /**
     * Pasa al metodo que asigna la clase segun el carrier, la clase correspondiente en cada caso
     */
    setStatusCarrier: function(){
      var carrier = this.getStatusCarrier();
      switch (carrier){
      case 1:
      case 10:
      case 11:
      case 20:
        this.setCarrierClass('trk-generic');
        break;
      case 5:
        this.setCarrierClass('trk-services');
        break;
      case 30:
        this.setCarrierClass('trk-kiala');
        break;
      }
    },

    /**
     * Recoge el texto que ha de mostrarse en estado de pedido
     */
    setStatusOrder: function(idType, txt){
      this.v_orderStatusDescription[idType] = txt;
    },

    /**
     * Recoge la descripcion que ha de mostrarse en la columna de estado en el listado de pedidos y en el sprite de estado de pedido
     */
    setStatusOrderList: function(idType, txt) {
      this.v_orderStatus[idType] = txt;
    }

});
/**
 *  99-privalia.mycart.js - Common
 * =========================================
 * @requieres: 	protoaculous.1.8.3.min.js, 10-cufon-yui.js
 * @revision: 	2.0
 */


/**
 * PrivaliaJsonMyCart - Common
 * =========================================
 * @modified: 	Naiara	(05-07-11)
 */
var PrivaliaJsonMyCart = Class.create(PrivaliaBase, {
	initialize: function($super) {
		$super();

		this.b_canBuy =					true;
		this.b_selectVouchersOpened = 	false;				// flag para controlar si es la primera vez que se abre el modal de seleccionar cheques
		this.b_isInOne=					false;

		this.code_prizeMin = 			'msg0250020'; 		// Importe minimo
		this.code_prizeMax = 			'msg0250021'; 		// Importe maximo
		this.code_quantityMax =			'msg0250022'; 		// cantidad maxima
		this.code_sizeMax = 			'msg0250023'; 		// volumen maximo
		this.code_limitByCampaign =		'msg0250024'; 		// limitacion de productos segun la campanya
		this.code_paypalReturn = 		'msg0250002'; 		// error o cancelacion de Paypal
		this.code_zoneChange = 			'msg0250010';
		this.code_EsAppId = 			119956331422980;		
		this.code_ItAppId = 			115384625214740;
		this.code_MexAppId =	 		233733629976596;
		this.code_BrAppId = 			213391272034152;
		this.code_expiredCreditCard = 	'msg0150005';		// error por tarjeta expirada
		this.code_olderCreditCard = 	'msg0150006';		// error por tarjeta de mas de un año o mas de 99 intentos
		this.code_invalidCreditCard = 	'msg0150007';		// error por tarjeta superado numero maximo de intentos
		this.errId =					'24';
		this.numProducts =				0;
		this.txt_checkingData =			'checking data';
		this.url_firstbuy	=			URL_SECURE + '/mycart/firstbuy';	// form de datos requeridos
		this.v_summaryErrors =			[];					// array que guarda las descripciones de los posibles errores del summary
		this.idAdvertisingCheckbox = 	'adv_checkbox_warp';
		this.idModalVouchers = 			'modalSelectVouchers';		// Id del modal de seleccionar cheques
		this.idSelectVouchers = 		'vouchers-form'; 	// id form de seleccionar cheques
		this.idShowVouchers = 			'vouchers-link';	// id link de seleccionar cheques
		this.idSummaryAddress =			'addresses-form';
		this.flag_radioRunning =		false;
		this.idInstallments = 			'installments';		// Id de la div que contiene al select con los valores de los parcelados
		this.v_installmentsCopy=    	[];					// array de copys para el select de parcelados
		this.noLink =					'.nolink';				// clase que se utiliza para designar los elementos link y controlar cuando es linkable
		this.size=						'size';					//id que se utiliza para ocultar la capa de la talla en confirmation cuando es un producto unico
		this.sFacebookTracking = 		'?provider=smmfbkshr';
		this.sTwitterTracking = 		'#provider=smmtwrshr';		
		this.orderShowVouchers =		false;					// controla si se muestra el cheque regalo de los servicios - Purchase
		this.b_quantity = 				false;
		this.idQuantitySelect =			'';					// id del select de cantidad donde se ha realizado la accion
		this.url_microsite	=			URL_DOMAIN + '/microsites/index';	// confirmacion, url escaparate
		this.newGrid =					".new-grid"; // clase que se utiliza para modifiar el grid cuando no hay talla
		this.linkMicrosite=				".js-microsite-link";
		this.linkOrder=					".js-order-link";
		this.idPromotionGlobal = "js-promotionglobal";
		this.idPromotionMemberAction =  "js-promotion-member-action"; //id banner promociones member action
		this.idPromotionClose = "js-promotion-close"; //id cerrar banner promociones member action
		this.idnewgrid	=	"new-grid-promotion"; //id para identificar el grid que debe de redimensionarse
		this.nSelectedCard =			'';						//tarjeta seleccionada
		this.nTokenTarjetDel = 			'';						//identificador de la tarjeta a eliminar
		this.sCssNoCardsStored = 		'.js-nocardsstored';   	//clase que se usa para mostrar ocultar lo referente a tarjetas almacenadas
		this.sIdCardList = 				'divCardList';			//id del div del listado de tarjetas almacenadas
		this.sIdInputSaveCard = 		'request_save_card';    //id del checkbox de guardar tarjeta
		this.sIdOldCard =				''; //id de la tarjeta seleccionada
		this.sIdSaveCardFields = 		'saveCardFields';		//id del div del form de guardar tarjeta
		this.sIdStoredCardInput=		'stored_card';			//id del input oculto que envia el token de la tarjeta seleccionada
		this.sIdTarjetDel = 			'';						//id del div de la tarjeta a eliminar
		this.sModalDeleteCreditCard = 	'';						//modal de eliminar tarjeta
		//version
    	this.version =					4.7;				//modificar version al crear un nuevo metodo
    	this.setVersion(this.version, 'PrivaliaJsonMyCart');
	},

	/**
	 * Construye la pagina con los datos pasados por json previamente
	 */
	buildPage: function(generate) {
		switch(generate) {
			case 'firstbuy':
				this.generateHtml();

				// aplicar tooltip a thumbnails de productos para ver ampliado
				this.setThumbnailTooltip();
				break;

			case 'firstbuyForm':
				this.generateHtml();
				this.putValuesInputIE();

				
				if ( Country.getIso()== 'mex' ) {

					
					if ($('what-is-ref-point-firstbuy')!==null && $('modal-ref-point-firstbuy')!==null){
						new PrivaliaTooltip('what-is-ref-point-firstbuy', 'modal-ref-point-firstbuy', {
							type: 'html'
						});
					}
				}
				break;

			case 'promotion':
				this.generateHtml({
					pushData: this.pushPromotion
				});
				
				//redimensionar el grid en italia porque el texto es mas largo
				if ( Country.getIso()== 'it' ) {
					this.resizeGrid();
				}
				
				//debe de ser despues del volcado
				Cufon.replace('.cufon');
				
				//cerrar promocion member action
				this.closePromotion();
				
				break;

			case 'confirmation':
				var data = this.getResData();
				this.generateHtml({
					pushData: this.pushConfirmation
				});

				// Promociones
				// Member Get Member
				// TODO: Falta condicional de si se ha de mostrar o no esta promo
				// Esto es mejor agruparlo en un metodo
				var orderPK = data.order_data.order_PK;
				var memberPK = data.order_data.order_FK_member_PK;
				var keyRaw =  memberPK.toString()+orderPK.toString();
				var url_getPromotions = '/myorder/getPromotions/order/' + orderPK + '/key/' + hex_md5(keyRaw);

				var PromoJson = new PrivaliaMyCart();
				PromoJson.setCssJson('json2');
				PromoJson.getData(url_getPromotions, 'promotion');

				// Selling Services
				// antes de nada, hay que controlar si venta de servicios activo para el pais
				if (Country.getService()){
					//declaro y llamo al proveedor para tener la modal preparada
					var Service = new PrivaliaSellingServices(this.getResData(), 'confirmation');
				}

				//enlace al resumen del pedido
				this.setBtnOrder();
				
				//enlace a escaparate
				this.setLinkMicrosite();
			
				this.nameCampaignOrder();
				this.orderPK();

				// aplicar tooltip a thumbnails de productos para ver ampliado
				this.setThumbnailTooltip();

				//Comprovamos si tiene descuentos
				this.setConfirmationDiscountPromo();

				// se comprueba que este habilitado la opcion de envio por varios operadores logisticos
				if (Country.getLogisticCarrier()){
					// si el valor es true
					KialaData.kialaIsAvailable(data);
				}

				//Comprueba si servicio de tipo purchase tiene cheque regalo
				this.getGiftCheckService();

				//Muestra el cheque regalo de tipo servicio - purchase
				if(this.orderShowVouchers){
					if ($('gift-check')!=null){
						$('gift-check').hide();
					}
				}
				//Parcelados
				//si es 0 no hay parcelados -> ES, IT y MEX
				//si es entero pasan el valor order_amount_with_installments

				if (this.order_installments != 0 && $(this.idInstallments)!= null) {
					$(this.idInstallments).removeClassName("hidden");
				}

				//Producto - Unico
				data.order_products.each(function(item){
					//Si es un servicio se oculta la talla por medio de la class 'standardProduct' y 'service hidden'
					//Si no es un servicio y el producto tiene talla unico
					if(this.getResData().campaign_data.campaign_product_types.service != '1'){
						if(item.prodf_websize == 'UNICO'){
							$(this.size).addClassName('hidden');
						}
					}
					if( (this.getResData().campaign_data.campaign_product_types.service == '0' && item.prodf_websize == 'UNICO' ) || (this.getResData().campaign_data.campaign_product_types.service == '1')) {
						//modificar grid de producto, cantidad y precio cuando no hay talla
						$$(this.newGrid).each(function(item2){
							if(item2.hasClassName('grid_2')) {
								//grid cantidad y precio pasa de grid_2 a grid_3
								item2.removeClassName('grid_2');
								item2.addClassName('grid_3');
							} else if (item2.hasClassName('grid_6')){
								//grid titulo producto pasa de grid_5 a grid_8
								item2.removeClassName('grid_6');
								item2.addClassName('grid_7');
							}
						});
					}
				},this);

				// Modulo Social
				var Social = new PrivaliaSocial(this, 'confirmation', this.getIsAdultCampaign(this.getResData()));
				break;

			case 'selectVouchers':
				this.generateHtml({
					pushData: this.pushVouchers
				});
				// seteamos los inputs que esten chequeados o deshabilitados
				this._setInputsVouchers();
				//Preparamos el modal de solo un cheque no seleccionable
				this._setOneCheckModal();
				//seteamos el numero de cheques que tiene
				this._setNumberOfVouchers();
				//mostrar condiciones de los cheques si es superior a 1
				this._showConditionsChecks();
				//this.highLight();
				//mostramos el formulario una vez cargados los datos
				if ( $(this.idSelectVouchers) != null ){
				$(this.idSelectVouchers).removeClassName('visibilityhidden');
				}
				//debe de ser despues del volcado
				Cufon.replace('.cufon');

				if ( $(this.idSelectVouchers) != null ){
				$(this.idSelectVouchers).stopWaiting();
				}
				break;
				
			case 'summary':
				var data = this.getResData();

				// Comprobar si recuperamos datos, sino, querra decir que la cesta esta vacia.
				// en tal caso lo redirigimos al escaparate
				if(Object.isArray(data) && data.size() === 0) {
					this.loadText('empty cart');
					this.redirectToMicrosites();
				} else {
					if(this.numProducts === 0) {
					// guardamos numero de productos que tiene la cesta
						this.numProducts = this.getResData().order_products.size();
					}
					if(this.numProducts === 0) {
					// puede que tenga datos del summary pero no tiene productos (pq se ha borrado por ejemplo)
					// en tal caso lo redirigimos al escaparate
						this.loadText('empty cart');
						this.redirectToMicrosites();
					} else {

						// comprueba el flag de si tiene los datos minimos requeridos para realizar una compra
						if(this.checkMemberRequiredData()) {

							// comprueba si el summary ha devuelto algun error en el textcode
							// errores tipo:
							// - importe minimo
							// - importe maximo
							// - sobrepeso
							// redesign - eliminamos el metodo que controla ocultar los pasos de compra porque ya no se oculta nada

							this.checkSummaryErrors();

							this.resetSizesOrderLines();

							if(this.reloading) {
								// volvemos a mover el formulario de codigo de tarjeta debajo
						        if(Country.getOneClickPayment() && $('member_credit_cards') != null){
						        	$('member_credit_cards').insert({after:$('code_security')});
						        }
							}
							this.generateHtml({
								pushData: this.pushSummary
							});

							// obtenemos breadcrumb dinamico. Caso especial Summary
							this.getDataBreadcrumb(this.getResData());
							Data.setSection({'bread_name':BREADSECTION["summary"]});
							this.buildBreadcrumb();

							// Para cada combo de talla, generamos el combo de las cantidades con el valor max a poder seleccionar
							this.limitSelectQuantity();
							
							// si no esta recargando do anything por lo que tiene que ser siempre false para que entre
							if(!this.reloading) {
								// redesign - estos metodos ya no hacen falta
								// btn seguir comprando
								//this.setBtnContinueBuying('btnContinueBuying');
								//this.setBtnContinueBuying('btnContinueBuying2'); // este boton es el que se muestra en caso de que no se puede comprar

								// Comprobar si hay que mostrar el Adv Checkbox
								this.checkAdvertisingCheckbox();
							}

							// Comprobar si estamos reabriendo un pedido
							if(!Country.reopenOrderEnabled() || !Reopen.checkIfReopened(this.getReopenedOrderPK())) {
								// marcamos el radio button de la direccion de envia selecionada
								this._setRadioCheck();

								// se comprueba que este habilitado la opcion de envio por varios operadores logisticos
								if (Country.getLogisticCarrier()){
									// si el valor es true
									if(KialaData.kialaIsAvailable(data)){
										// controla el operador logisitico seleccionado al cargar la pagina
										KialaData.controlSelectedCarrier(data);
										// obtenemos la url de datos
										KialaData.getData('/kiala/getConnectionURL','kiala');
									}
								}
							}
							//Comprobamos si tiene descuentos
							this.setSummaryDiscountPromo();
							//Comprobamos si puede seleccionar cheques regalo
							this.checkShowVouchersLink();
							//Comprobamos si los cheques regalo seleccionados superan a la cantidad de la compra
							this.checkShowVouchersError();
							//si esta activo el servicio de compra en un clic para el pais
							if (Country.getOneClickPayment()){
								this.checkCards();
							}
							//mostramos el tooltip de cambio de cheque si recibimos el flag
							if(this.getResData().order_pricing.show_vouchers_modified == true){
								this.pointVoucherNotify(this.getTxt('voucherModified'));
							}
						}
					}
				}

				// aplicar tooltip a thumbnails de productos para ver ampliado
				//this.setThumbnailTooltip();

				// Selling Services
				// antes de nada, hay que controlar si venta de servicios activo para el pais
				if (Country.getService()){
					//declaro y llamo al proveedor para tener la modal preparada
					var Service = new PrivaliaSellingServices(this.getResData(), 'summary');
				}

				//Comprueba si servicio de tipo purchase tiene cheque regalo
				this.getGiftCheckService();

				//Muestra el cheque regalo de tipo servicio - purchase
				if(this.orderShowVouchers){
					if ($('gift-check')!=null){
						$('gift-check').hide();
					}
				}
				
				break;

			default:
				this.generateHtml();
		}
	},



	/**
	 * Cierra el modal de seleccionr cheques aceptando la seleccion de cheques regalo
	 * Datos +Form
	 */
	acceptSelectVouchers: function (PJson, modal) {
		modal.close();
		PJson.reload();	
		$('logo').scrollTo();
	},
	
	/**
	 * Cierra el modal cancelando la seleccion de cheques regalo
	 * Datos + Form
	 */
	cancelSelectVouchers: function (PJson, modal) {
		var url = '/mycart/selectVoucher';
		// hacemos la llamada y esperamos la respuesta para hacer un reload del summary
		new Ajax.Request(url, {
			   onComplete: function() {
				   PJson.reload();
			   }
		 });
		// cerrar el modal
		modal.close();
	},
	/**
	 * Mostramos y gestionamos las tarjetas almacenadas
	 */
	cardsStored: function(){
		var aNoCards = $$(this.sCssNoCardsStored);
		aNoCards.each(function(item){
			item.hide();
		});
		if($(this.sIdCardList) != null){
			$(this.sIdCardList).show();
		}
		if($('js-seeCards') != null){
			$('js-seeCards').hide();
		}
		this._setRadioCards();
	},
	/**
	 * Gestion del advertising checkbox
	 * @param {Object} status - variable que determina la ausencia del checkbox
	 */
	checkAdvertisingCheckbox: function (){
		if (this.getResData().member_missing_data.member_advertising == 0){
			$(this.idAdvertisingCheckbox).show();
		}
	},
	/**
	 * Gestionamos el formulario de pago para compra en un clic
	 */
	checkCards: function() {
		var bOneClickService = this.getResData().oneclick_data.member_oneclick_active,
		nNumberOfCards = this.getResData().member_credit_cards.size();
		//mostramos la opcion de guardar tarjeta si tiene el servicio activo
		if(bOneClickService === 1){
			if($('saveCardContent') != null){
				$('saveCardContent').show();
			}
			//si tiene tarjetas almacenadas las mostramos
			if( nNumberOfCards > 0){
				this.cardsStored();
			}
		}
	},
	/**
	 * Comprobacion de link cambiar cheques regalo
	 */
	checkShowVouchersLink: function (){
		// comprobamos si el flag para mostrar el link esta a true y si existe el div
		if (this.getResData().order_pricing.show_vouchers_modal == true){
			if($(this.idShowVouchers) != null){
				$(this.idShowVouchers).show();
			}
		}
	},
	
	/**
	 * omprobamos si los cheques regalo seleccionados superan a la cantidad de la compra
	 */
	checkShowVouchersError: function (){
		// comprobamos si el flag de error esta a true
		if(this.getResData().order_pricing.show_vouchers_error == true){
			modalErorrVouchers.open();
		}
	},

	/**
	 * comprueba el flag de si tiene los datos minimos requeridos para realizar una compra
	 */
	checkMemberRequiredData: function(target) {
		var hasData = true;

		this.loadText(this.txt_checkingData);

		// el flag es FALSE, significa que le faltan datos.
		// lo redirigimos a Firstbuy
		hasData = this.getResData().member_missing_data.member_obligatory_data;
		if(hasData) {
			this.stopLoadText();
		}
		else {
			this.redirectToFirstBuy();
		}

		return hasData;
	},

	checkSummaryErrors: function () {
		var error = false;
		var code = this.getResTextcodes();

		if(
				code == this.code_prizeMin 				// Importe minimo
			||	code == this.code_prizeMax 				// Importe maximo
			||	code == this.code_quantityMax 			// cantidad maxima
			||	code == this.code_sizeMax 				// volumen maximo
			||  code == this.code_limitByCampaign 		// limite de productos establecido por campanya

		)
		{
			error = true;
			this.b_canBuy = false;
		}

		if(

				code == this.code_paypalReturn 	// error o cancelacion de paypal

		)
		{
			this.notify(code);
			// redesign - eliminamos el metodo que controla ocultar los pasos de compra porque ya no se oculta nada
			//this.setContinueBuying(true);
		}

		return error;
	},

	/**
	 * Cerramos el div de notificaciones
	 */
	closePromotion: function() {
		if ( $(this.idPromotionClose) != null && $(this.idPromotionMemberAction != null) ){
			$(this.idPromotionClose).observe('click', (function() {
				this.hideItem(this.idPromotionMemberAction);
				$(this.idPromotionGlobal).addClassName("hidden");
			}).bind(this));
		}
			
	},
	/**
	 * Proceso para eliminar un tarjeta
	 */
    deleteCreditCard: function() {
    	if(!Object.isUndefined(this.sModalDeleteCreditCard)) {
			this.sModalDeleteCreditCard.close();
		}
        this._submitDeleteCreditCard(this.nTokenTarjetDel, this.sIdTarjetDel);

    	this.nSelectedCard = '';
    },

	/**
	 * Abre el modal para eliminar una tarjeta y almacena token de la tarjeta y la id div a eliminar
	 */
    deleteCreditCardModal: function(modal, token) {
    	this.sModalDeleteCreditCard = modal;
		modal.open();
		this.nTokenTarjetDel = token;
		this.sIdTarjetDel = 'tarjet_content_'+token;
    },
	/**
	 * Aplica el tooltip de error en caso de exceder la cantidad maxima permitida en caso de ser una campanya con limite de compra
	 */
	exceedMaxQuantity: function(){
		// recogemos el codigo de error que se pasa por json
		var textcode = this.getResTextcodes();
		// recogemos el select donde se ha realizado la accion
		var id = this.idQuantitySelect;
		// si el select existe y esta en la tpl
		if(id != null && $(id) != null){
			// recogemos los copys correspondientes al error y notificamos el error
			new PrivaliaTooltip(id, this.getMsgCode(textcode), {
				showNow: true,
				status: 'error',
				target: 'l',
				tip: 'l'
			});
		}
	},
	getData: function ($super, url, section) {
		switch(section) {
			case 'firstbuy':
			case 'confirmation':
			case 'summary':
				this.onHeader400(this.url_microsites);
				break;
		}

		$super(url, section);
	},

	/**
	 * Devuelve el order_PK del pedido reabierto
	 * Si no esta reabriendo el pedido, el valor es 0
	 */
	getReopenedOrderPK: function () {
		return this.getResData().order_data.order_reopened;
	},

	/**
	 * Dado la forma de pago, es decir tarjeta
	 * Puede ser TARJETA=mastercard,visa,.. o PAYPAL=paypal
	 */
	getCardType: function (s_Type) {
		var s_type_card  = "";

		if(s_Type == "paypal") {
			s_type_card = this.getTxt("paypal");
		}
		else {
			s_type_card = this.getTxt("card");
		}
		return s_type_card;
	},

	/**
	 * Cheque regalo - Servicos de tipo Purchase
	 * Si el producto es de tipo servicio y ademas es de tipo purchase entonces
	 * mostrar el cheque regalo
	 */
	getGiftCheckService: function () {

		if (this.getResData().campaign_data.campaign_product_types.service == '1'){

			if(target == "order_pricing"){
				if (dataJson.order_show_vouchers != null && dataJson.order_show_vouchers == true){
					this.orderShowVouchers = true;

				}
			}
		}
	},

	/**
	 * Mover el name de la marca al div contenedor del resumen de pedido
	 */
	nameCampaignOrder: function () {
		$('content-name-campaign-order').update($('name-campaign-order').innerHTML);
		$('name-campaign-order').update('');
	},
	/**
	 * Mover el order-pk de la marca al div contenedor del resumen de pedido
	 */
	orderPK: function () {
		var orderPKConfirmation = $$('.content-order-pk');
		if (orderPKConfirmation) {
			orderPKConfirmation.each(function(item) {
				$(item).update($('order-pk').innerHTML);
			});
		}
		$('order-pk').update('');
	},
	/**
	 * devuelva descripcion de los diferentes errores que puede darse en el summary
	 */
	getSummaryErrors: function (code) {
		return this.v_summaryErrors[code];
	},
	/**
	 * Para cada combo de talla, generamos el combo de las cantidades con el valor max a poder seleccionar
	 */
	limitSelectQuantity: function () {
		this.v_ordLines.each(function(id) {
			idSelectSize = 'selectsize-' + id.stockPK;
			idSelectQuantity = 'selectquantity-' + id.stockPK;
			// En funcion de la talla seleccionada en el combo Talla, generar el combo de cantidad (con cantidad max disponible)
			this.setSelectQuantity(idSelectSize, idSelectQuantity, '', id.quantity);
		}, this);
	},
	/**
     * Abre el modal para seleccionar cheques regalo
      * Datos + Form
	 */
	openSelectVouchers: function (PJson, modal) {
		// si es la primera vez hemos de cargar datos del formulario
		if(!this.b_selectVouchersOpened) {
			PJson.getData('/mycart/selectVoucher', 'selectVouchers');
			this.b_selectVouchersOpened = true;
		}
		//si ya a aceptado o cancelado cambios hemos de hacer un reload sin parametros de voucher
		else{
			var url = '/mycart/selectVoucher';
			// volvemos a setear la url del getData para actualizar
			PJson.setUrlGetData(url);
			PJson.reload();
		}
		modal.open();
	},
	pointVoucherNotify: function (text) {
    		var target = 'js-vouchersAmount';
    		// creamos tooltip
			var Tip = new PrivaliaTooltip(target, text, {
				closeBtn: 	false,
				showNow: 	true,
				status:		'ok',
				autoClose:	8,
				target: 'l',
				tip: 'r'
			});
			Tip.setPosition(-175, -3);
    },
    /**
	 * Volcado de datos para Confirmation, confirmar pedido
	 */
	pushConfirmation: function (dataJson, index) {
		var target = this.getTarget();
		if(target == "order_payments") {
			dataJson.authorisation_payment = "";
			// contador del numero de pagos
			dataJson.payment_number = index + 1;
			// si no existe numero de autorizacion se oculta la div
			if(dataJson.response_authorisationcode == null){
				dataJson.authorisation_payment = 'hidden';
			}
			if (dataJson.ftransaction_agent != null){
				dataJson.transaction_agent = this.getCardType(dataJson.ftransaction_agent);
			}

		}
		//indice de cada elemento del listado de pedido para mostrar la modal de la ficha de producto
		if(target == "order_products") {
			dataJson.index = index;
			
			//Sharing Info
			dataJson.addthis_url = Country.getIso() + "." + Country.getDomain() + "/microsites/fittingroom/campaign/" + dataJson.ordline_FK_campaign_PK  + "/category/" + dataJson.product_category + "/product/" + dataJson.product_PK + this.sTwitterTracking;
			dataJson.addthis_description = this.replaceQuotesAndHtmlTags(this.getResData().order_products[index].ordline_description) + ' ' + this.getTxt('of') + ' ' + this.getResData().confirmation_data.campaign_name ;
			dataJson.feed_dialog_link = this._getFeedDialogParameters (index);
			//El title del enlace remplaza las comillas dobles de la descripcion a comillas simples
			dataJson.title =  this.replaceQuotesAndHtmlTags(dataJson.ordline_description);	
		
		}

		// sumo datos a volcar
		this.addBuilt(dataJson);
	},

	/**
	 * Volcado de datos para Confirmation, promociones. Solo puede aparecer una de las dos
	 */
	pushPromotion: function (dataJson, index) {
		var target = this.getTarget();
		
		dataJson.hidememberaction = "hidden";
		dataJson.hideincentive = "hidden";
		
		if(target == "order_promotions") {
			
			//mostrar mgm con incentivos
			this.showMGMIncentive(dataJson);
		
			//mostrar promocion member action al realizar la compra X
			this.showPromotionMemberAction(dataJson);
		}
		// sumo datos a volcar
		this.addBuilt(dataJson);
	},

	/**
	 * Volcado de datos para Summary
	 */
	pushSummary: function (dataJson, index) {
		var target = this.getTarget();
		// para la lista de productos, generar el select de cambiar talla
		if(target == "order_products") {
			dataJson.index = index;
			
			//Sharing Info
			dataJson.addthis_url = Country.getIso() + "." + Country.getDomain() + "/microsites/fittingroom/campaign/" + dataJson.ordline_FK_campaign_PK  + "/category/" + dataJson.product_category + "/product/" + dataJson.product_PK + this.sTwitterTracking;
			dataJson.addthis_description = this.replaceQuotesAndHtmlTags(this.getResData().order_products[index].ordline_description) + ' ' + this.getTxt('of') + ' ' + this.getResData().campaign_data.campaign_name ;
			dataJson.feed_dialog_link = this._getFeedDialogParameters (index);
			
			//El title del enlace remplaza las comillas dobles de la descripcion a comillas simples
			dataJson.title =  this.replaceQuotesAndHtmlTags(dataJson.ordline_description);
			
		     // redesign - clase que se aplica a cada linea de producto a partir de del segundo
			if(index > 0){
				dataJson.style_product_tab = 'padtop15' + " " + 'padbot15';
			} else {
				dataJson.style_product_tab = 'padtop10' + " " + 'padbot10';
			}

			//CANTIDAD
			dataJson.prodf_availables.each(function(item){
				// buscamos la cantidad correspondiente a la talla escogida
				if(item.stockp_PK === dataJson.ordline_FK_stockp_PK){
					// si no hay disponibilidad del articulo y la cantidad adquirida es una unidad
					if(item.quantity == 0 && dataJson.ordline_quantityOrdered == 1){
						// ocultamos el combo
						dataJson.quantity_one_left = dataJson.ordline_quantityOrdered;
						dataJson.hideOnlyOne = "hidden";					
						
						// tooltip de cantidad es distinto segun el producto tenga tallas, o no, sea un servicio
						// Si es un servicio, la clase "standardProduct" ya se encarga de ocultar
						if(this.getResData().campaign_data.campaign_product_types.service != '1'){
							if(dataJson.prodf_websize == 'UNICO'){
								// ocultamos los tooltips con texto de talla o servicio
								dataJson.hideTooltipOneLeftSize = 'hidden';
								dataJson.hideTooltipOneLeftService = 'hidden';
								dataJson.hideTooltipOneLeftNoSize = 'nohidden'; // ie7 no interpreta de forma correcta un volcado vacio
							}
							else {
								dataJson.hideTooltipOneLeftNoSize = 'hidden';
								dataJson.hideTooltipOneLeftService = 'hidden';					
								dataJson.hideTooltipOneLeftSize = 'nohidden'; // ie7 no interpreta de forma correcta un volcado vacio
							}
						}
					}
					else{
						// esto se pone porque ie7 no interpreta de forma correcta un volcado vacio
						dataJson.hideSelectQuantity = 'nohidden';
					}
				}
			},this);

			// TALLA
			// Alimentar el select de cambiar talla dando los valores en un array de json
			var options = this.feedSelectSize(dataJson.prodf_availables, dataJson.ordline_FK_stockp_PK);
			dataJson.size_options = '<select id="selectsize-' + dataJson.ordline_FK_stockp_PK+ '" name="ordline_size" onchange="Data.changeSize(\'' + dataJson.ordline_PK+ '\', this);" onclick="this.style.width = \'auto\';" onblur="this.style.width = \'100px\';">' + options + '</select>';

			// si solo hay un tipo de talla
			if(dataJson.prodf_availables.length == 1){
				/// oculta el select
				dataJson.hideSelectSize = 'hidden';
				// muestra la talla sin enlace
				dataJson.size_no_link = dataJson.prodf_websize;

				// Si es un servicio ya se oculta la talla por medio de la class 'standardProduct'
				// pero si no es un servicio y el producto tiene talla unico
				if(this.getResData().campaign_data.campaign_product_types.service != '1'){
					if(dataJson.prodf_websize == 'UNICO'){
						// ocultamos toda la capa que contiene la talla
						dataJson.hideSize = 'hidden';
					}
				}
			}
			// si hay mas de un tipo de tallas
			else {
				// por cada talla disponible
				dataJson.prodf_availables.each(function(item){
					// si es diferente de 0 es que hay disponiblidad en alguna talla
					if(item.quantity != 0){
						// cambiamos el flag a true
						this.b_quantity = true;
					}
				},this);

				// si hay tallas disponibles
				if(this.b_quantity){
					// esto se pone porque ie7 no interpreta de forma correcta un volcado vacio
					dataJson.hideSelectSize = 'nohidden';
				}
				else{
					// ocultamos el combo de tallas
					dataJson.hideSelectSize = 'hidden';
					// se muestra el nombre de la talla pero sin ser link
					dataJson.size_no_link = dataJson.prodf_websize;
				}

			}

			this.setSizesOrderLines(dataJson.ordline_FK_stockp_PK, dataJson.ordline_quantityOrdered);

			// en caso de ser explorer
			if(!this.checkUserAgent("msie")){
				dataJson.floatRightClass = 'right';
			}
			else{
				// esto se pone porque ie7 no interpreta de forma correcta un volcado vacio
				dataJson.floatRightClass = 'noRight';
			}

			// seteamos el flag para la siguiente iteracion de producto
			this.b_quantity = false;

		}

		if(target == "campaign_data") {
			this.campaignPK = dataJson.campaign_PK;
		}

		if(Country.getLogisticCarrier()){
			if(target == "order_data") {
				// si el objeto kiala_data esta definido
				if(!Object.isUndefined(dataJson.kiala_data)){
				// volcado de la direccion del punto de entrega Kiala
				KialaData.setAddress(dataJson.kiala_data.kp_name, dataJson.kiala_data.kp_street, dataJson.kiala_data.kp_city, dataJson.kiala_data.kp_zipcode);
				}
			}
		}

		// Parcelados
		if(target == "order_installments"){
			// si se pasa un valor vacio
			if(Object.isArray(dataJson) && dataJson.length == 0){
				// se oculta el select de parcelados
				$(this.idInstallments).hide();
			}
			else{
				// Aplicamos los copys correctos dentro del select de parcelados
				this.setCopyInstallmentsSelects(dataJson);
			}
		}

		// Direcciones
		if(target == "delivery_addresses"){
			dataJson.memaddress_adtype = this.getAddressType(dataJson.memaddress_FK_adtype_PK);
		}


		// aplicar aquí la misma coprobacion que en el case para Kiala

		// Aplicamos el chat
		/* TODO: pendiente disenyo
		if(target == "chat_data") {
			if(dataJson.show_chat == 1) {
				var url = this.getUrl().toLowerCase();
				urlSection = url.split("summary/")[0]; // Parte de la url correspondiente a la seccion ej. http://it.privalia.loc/mycart/

				// Pasamos los parametros necesarios para inicializar el chat
				this.setChatSession(urlSection, this.campaignPK, this.isoCountry, dataJson.protocol, dataJson.member_name, dataJson.member_email );
			}
			else {
				// Escondemos el chat con la clase css hidden
				dataJson.hidden = 'hidden';
			}
		}
		*/

		//var advStatus = this.getResData();

		//Tooltip info - Modal cvv
		// (param1 = accion, param2 = html)
		new PrivaliaTooltip('what-is-this-link', 'modal-cvv', {
			type: 'html'
		});

		//Tooltip info - Codigo tarjeta
		// (param1 = accion, param2 = html)
		if (Country.getOneClickPayment()){
			new PrivaliaTooltip('what-is-tarjetnewcode-link', 'modal-tarjetnewcode', {
				type: 'html'
			});
		new PrivaliaTooltip('what-is-tarjetcode-link', 'modal-tarjetcode', {
			type: 'html'
		});
			new PrivaliaTooltip('what-is-tarjetcodeinmodal-link', 'modal-tarjetcodeinmodal', {
				type: 'html'
			});
		}
		//Tooltip info - Modal RFC Mexico
		// (param1 = accion, param2 = html)
		if (Country.getIso()== 'mex'){
			new PrivaliaTooltip('rfcLink', 'modal-rfc', {
				type: 'html'
			});
			new PrivaliaTooltip('what-is-safety-link', 'modal-safety', {
				type: 'html'
			});
			
		}


		// sumo datos a volcar
		this.addBuilt(dataJson);
	},

	/**
	 * Volcado de datos seleccionar cheques
	 */
	pushVouchers: function (dataJson, index) {
		var target = this.getTarget();
		if(target == "vouchers_list") {
			var css_first = 'first',
				css_firstGroup = 'firstingroup',
				css_disabled = 'disabled',
				css_checked = 'checked',
				s_avaliable = '',
				sVoucherStatus = '',
				sMin = '',
				b_checked = false;
			// marcamos la primera fila de la lista
			if(index == 0){
				dataJson.css = css_first;
			}
			// agrupamos los cheques por tipo
			else{
				// comparamos el tipo actual con el anterior y si es diferente lo marcamos
				var oVoucher = this.getResData().vouchers_list;
				if ( (!Object.isUndefined(oVoucher)) && (oVoucher.length != 0) ){
					var statusPrev = oVoucher[index-1].voucher_type;
				var statusThis = dataJson.voucher_type;
				if (statusPrev != statusThis){
					dataJson.css = css_firstGroup;
				}
			}
			}
			// comprobamos si esta desabilitado y si lo esta recuperamos el texto de razon
			if ( (dataJson.voucher_available !== undefined)) {
				s_avaliable = dataJson.voucher_available.toString();
			if(s_avaliable != '1'){
				dataJson.disabled = css_disabled;
					sVoucherStatus = this.getTxt(s_avaliable);
					if ( dataJson.voucher_min_order_amount !== undefined ){
						sMin = dataJson.voucher_min_order_amount;
					}
					switch (s_avaliable){
						case '6':
							dataJson.voucher_status = sVoucherStatus + "&nbsp;" + sMin;
							break;
						default:
							dataJson.voucher_status = sVoucherStatus;
							break;
					}
				}
			}
			// comprobamos si esta checkeado para marcarlo
			b_checked = dataJson.voucher_checked;
			if(b_checked){
				dataJson.checked = css_checked;
			}
		}

		this.flag_radioRunning = false;

		this.addBuilt(dataJson);
	},
	
	/**
	 * Redirige a la pagina del firstbuy
	 */
	redirectToFirstBuy: function () {
		this.load();
		document.location.href = this.url_firstbuy;
	},


	/**
	 * Redimensionar el grid que contiene el banner de promociones
	 */
	resizeGrid: function () {
		if ( $(this.idnewgrid) != null ){
			if($(this.idnewgrid).hasClassName('grid_9')) {
				$(this.idnewgrid).removeClassName('grid_9');
				$(this.idnewgrid).addClassName('grid_10');
			}
		}
	},

	/**
	 * reverificacion de la tarjeta desde error
	 */
	reverificationForm: function(token) {
		$('card_holder_name').value = $F('owner_name_'+token);
		$('payment_method').value = $F('type_'+token);
		$('card_expiration_month').value = $F('month_'+token);
		$('card_expiration_year').value = $F('year_'+token);
		$('card_title').value = $F('name_'+token);
		this.selectOtherMethod();
		this.saveThisCard();
	},
	/**
	 * modal reverificacion de la tarjeta
	 */
	reverificationModal: function() {
		//recuperamos el token de la trajeta seleccionada
		var token = $(this.nSelectedCard).value;
		//transferimos todos los valores al formulario del modal
		$('card_holder_name_edit').value = $F('owner_name_'+token);
		$('payment_method_edit').value = $F('type_'+token);
	    $('card_expiration_month_edit').value = $F('month_'+token);
	    $('card_expiration_year_edit').value = $F('year_'+token);
	    $('card_title_edit').value = $F('name_'+token);
	    $('card_token_edit').value = $F('token_'+token);
	    modalEditCreditCard.open();
	    $(this.sIdSaveCardFields).addClassName('hidden');
	},
	/**
	 * reverificacion de la tarjeta desde el modal
	 */
	reverification: function(token) {
		modalEditCreditCard.close();
		//this.activePayment('payment_method');
		this.selectOtherMethod();
		this.saveThisCard();
		//transferimos todos los valores desde el modal al formulario de pago
		$('payment_method').value = $F('payment_method_edit');
		$('card_number').value = $F('card_number_edit');
		$('card_expiration_month').value = $F('card_expiration_month_edit');
		$('card_expiration_year').value = $F('card_expiration_year_edit');
		$('card_holder_name').value = $F('card_holder_name_edit');
		$('cvv2').value = $F('cvv2_edit');
		$('card_title').value = $F('card_title_edit');
		$('new_card_security_code').value = $F('new_card_security_code_edit');
		$('card_edit_token').value = $F('card_token_edit');

		if(Country.getIso() == 'it'){
			$('card_number1').value = $F('card_number1_edit');
			$('card_number2').value = $F('card_number2_edit');
			$('card_number3').value = $F('card_number3_edit');
			$('card_number4').value = $F('card_number4_edit');
		}
		//limpiamos el formulario del modal
		this.clearForm('editCard');
	},
	/**
	 * reverificacion de la tarjeta sin modal
	 */
	reverificationNoModal: function() {
		if ($(this.nSelectedCard) != null){
			var token = $(this.nSelectedCard).value;
		}
		//transferimos todos los valores desde el modal al formulario de pago
		$('payment_method').value = $F('type_'+token);
		$('card_expiration_month').value = $F('month_'+token);
		$('card_expiration_year').value = $F('year_'+token);
		$('card_title').value = $F('name_'+token);
		this.activePayment('payment_method');
		this.selectOtherMethod();
		this.saveThisCard();
	},
	/**
	 *  muestra o oculta el form de guardar tarjeta y control si el input oculto esta activado o desactivado
	 */
	saveThisCard: function() {
		//comprobamos si esta seleccionado guardar la tarjeta
		var bIsChecked = $(this.sIdInputSaveCard).readAttribute("checked");
		//marcamos y desmarcamos el input
		if (bIsChecked == 'checked') {
			$(this.sIdInputSaveCard).removeAttribute("checked");
		}else{
			$(this.sIdInputSaveCard).writeAttribute("checked", "checked");
		}
		// mostramos la parte del form para guardar la tarjeta
		if($(this.sIdSaveCardFields) != null){
			$(this.sIdSaveCardFields).toggleClassName('hidden');
		}
	},
    
	/**
	 * Seleccionamos una tarjeta guardada
	 */
	selectCard: function(value) {
		// cargar el formulario debajo de la direccion
        $('tarjet_'+value).insert({after:$('code_security')});
        //guardamos el select marcado para posteriores gestiones
        this.nSelectedCard = 'stored_card_'+value;
        //seteamos el input con el valor a enviar
        $(this.sIdStoredCardInput).value = value;
	},

	/**
	 * Cambiar tarjeta seleccionada a otro metodo de pago
	 */
	selectOtherMethod: function(){
		var aNoCards = $$(this.sCssNoCardsStored);
		aNoCards.each(function(item){
			item.show();
		});
		$('js-seeCards').show();
		$(this.sIdCardList).hide();
		$(this.sIdStoredCardInput).value = '';
	},
	/**
	 * seleccionamos cheque regalo
	 */
	selectVoucher: function(item){
		if (this.flag_radioRunning != true ){
			this.flag_radioRunning = true;
			if ( $(this.idSelectVouchers) != null ){
			$(this.idSelectVouchers).startWaiting('whitewaiting');
			}
			var 	voucherPK = item.value,
			url = '/mycart/selectVoucher/voucher/'+voucherPK;
			// volvemos a setear la url del getData para actualizar
			this.setUrlGetData(url);
			this.reload();
		}
	},
	
	/**
	 * Pone el link del escaparate
	 */
	setLinkMicrosite: function () {
		var v_microsites_links = $$(this.linkMicrosite);
		if (v_microsites_links != null){
			var s_url = this.url_microsite;
			if ( s_url != "" ) {
				v_microsites_links.each(function (link){
					$(link).href = s_url;
				});
			}
		}
	},

	/**
	 * Gestion del advertising checkbox
	 * @param {Object} status - variable que determina la ausencia del checkbox
	 */
	setAdvertisingCheckbox: function (status){
		if (status == 0){
			$(this.idAdvertisingCheckbox).show();
		}
	},

	/**
	 * Pone el link de la campanya al boton indicado
	 */
	setBtnContinueBuying: function (idBtn) {
		var url = this.getResData().campaign_data.continue_shopping_url;
		url = URL_DOMAIN + '/' + url.substring(1);
		$(idBtn).href = url;

	},

	setBtnOrder: function () {	
		var v_order_links = $$(this.linkOrder);	
		var orderPK = this.getResData().confirmation_data.order_PK;
		
		if ( v_order_links != null && orderPK != '' ){	
			
			v_order_links.each(function (link){
				$(link).observe('click', (function() {
			this.goToOrder(orderPK);
		}).bind(this));
			},this);
		}
	},


	setTooltips: function ($super, page) {
		$super();
		switch(page) {
			case 'summary':
				if(!this.b_canBuy) {
					var textcode = this.getResTextcodes();

					switch(textcode) {
						// tooltip para volumen excedido o cantidad maxima
						case this.code_sizeMax:
						case this.code_quantityMax:
							// aparte del tooltip, tenemos que bajar un poco la caja de resumen, para que el tooltip no tape el titulo
							$('order_products').addClassName('tooltip-mode');
							$('order_pricing').addClassName('tooltip-mode');

							new PrivaliaTooltip('order_products', this.getMsgCode(textcode), {
								showNow: true,
								status: 'error',
								target: 'tl',
								tip: 'bl'
							});
							break;

						// tooltip para importe minimo o maximo
						case this.code_limitByCampaign:
						case this.code_prizeMin:
							new PrivaliaTooltip('js-order-total', this.getMsgCode(textcode), {
								showNow: true,
								status: 'error',
								target: 'br',
								tip: 'tr'
							});
							break;
						case this.code_prizeMax:
							new PrivaliaTooltip('order_pricing', this.getMsgCode(textcode), {
								showNow: true,
								status: 'error',
								target: 'br',
								tip: 'tr'
							});
							break;
					}
				}

				break;

	
	
								
				
	

		}
	},

	/**
	 * Aplica los copys correspondientes que iran dentro del select de parcelados
	 */
	setCopyInstallmentsSelects: function(object){
		// extraemos la id del select
		data = Object.values(object);
		// si es mayor que 1
		if(data[0] > 1){
			// aplicamos el copy en plural
			object.copy = this.v_installmentsCopy[1];
		}
		else{
			// aplicamos el copy en singular
			object.copy = this.v_installmentsCopy[0];
		}
		return object;
	},

	setCountry: function(country) {
		this.isoCountry = country;
	},

	/**
	 * Recoge los copys que iran dentro del select de parcelados
	 */
	setInstallmentsText: function(txt) {
		this.v_installmentsCopy = txt;
	},
	/**
	 * Comprueba si tiene alguna promocion y muestra la linea correspondiente
	 */
	setConfirmationDiscountPromo: function(){
		var s_orderDiscount = this.getResData().order_pricing.order_discount;
		if (this.hasDiscountPromo('confirmation',s_orderDiscount)){
			$('discountPromo').removeClassName('hidden');
		}
	},
	/**
	 * Comprueba si tiene alguna promocion, mueve los datos al div container y muestra la linea correspondiente
	 */
	setSummaryDiscountPromo: function(){
		if (this.hasDiscountPromo('summary')){
			$('marketing_promotions_container').update($('marketing_promotions').innerHTML);
			$('marketing_promotions_container').removeClassName('hidden');
		}
	},
	/**
	 * En funcion de la talla seleccionada en el combo Talla, generar el combo de cantidad (con cantidad max disponible)
	 * TODO: mike - Si la logica de los combos de cambiar talla y cantidad funcionan bien, esta funcion se puede borrar
	 */
	setSelectQuantity2: function (idSelectSize, idSelectQuantity, defaultTxt, quantity) {
		// la var defaultTxt no se utiliza en mycart, pero mantenemos herencia del privalia.base.js
		if(idSelectSize != '' && idSelectQuantity != '') {
			var html = 			'';
			var tpl = 			new Template(TPL_SELECT); // TPL_SELECT definido en global.js

			for(i = 1 ; i <= quantity ; i++) {
				option = {
					label: i,
					value: i
				};
				html += tpl.evaluate(option);
			}
			if(html != '') {
				$(idSelectQuantity).update(html);
			}
		}
	},

	/**
	 * guardar descripcion de los diferentes errores que puede darse en el summary
	 */
	setSummaryErrors: function (code, txt) {
		this.v_summaryErrors[code] = txt;
	},

	showMGMIncentive: function (dataJson) {
		if(dataJson.mgm_shipping_cost){
			if ( $(this.idPromotionGlobal) != null ){
				$(this.idPromotionGlobal).removeClassName('hidden');
				if ( $("mgm-banner") != null ) {
					dataJson.hideincentive = "";
				}
			}
		}
	},
	/**
	 * Mostrar el banner de promociones de member action
	 */
	showPromotionMemberAction: function (dataJson) {
		// Si la promocion esta activada, mostramos el banner
		if (dataJson.member_action_modal){
			if ( $(this.idPromotionGlobal) != null ){
				$(this.idPromotionGlobal).removeClassName('hidden');
				if ( $(this.idPromotionMemberAction) != null ) {
					dataJson.hidememberaction = "";
				}
				//enlace a escaparate
				this.setLinkMicrosite();
			}
		}
	},
	/**
	 * Sumbit para el formulario de modificar datos de tarjeta guardada en modal
	 */
	submitEditCard: function(idForm) {
		this.submit(idForm, this._submitEditCard.bind(this));
	},
	/**
	 * mostramos el bloque de tarjetas almacenadas y deseleccionamos el guardar tarjetas
	 */
	viewCardsStored: function(){
		this.cardsStored();
		if($(this.sIdInputSaveCard) != null){
			$(this.sIdInputSaveCard).removeAttribute("checked");
		}
		if($(this.sIdSaveCardFields) != null){
			$(this.sIdSaveCardFields).addClassName('hidden');
		}
	},
	/**
	 * Obtener el numero total de cheques regalo
	 */
	getVoucherNumber: function(){
		var oResData = this.getResData();
		if (oResData.vouchers_total !== undefined){
			return oResData.vouchers_total.vouchers_number;
		} else {
			return '';
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaMyCart@getVoucherNumber: this.getResData().vouchers_total.vouchers_number not found');
			}
		}
	},
	/**
	 * Recupera el valor del Deadline, comun para todas las secciones
	 * @param {Object} info
	 * @param {Object} section
	 */
	_getDeadLine: function (info){
		var sDeadLine = '';
		if (info.campaign_data !== undefined) {
			sDeadLine = info.campaign_data.campaign_enddate;
		} else {
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaMyCart@_getDeadLine: data.campaign_data not found');
			}
		}
		if (sDeadLine !== ''){
			return sDeadLine;
		} else {
			return '';
		}
	},
	/**
	 * Recupera el nombre de la campanya para el compartir en facebook
	 * @param {Object} info
	 */
	_getFeedDialogCampaignName: function (data){
		var sFeedDialogCampaignName = '';
		if (data.confirmation_data !== undefined) {
			sFeedDialogCampaignName = data.confirmation_data ? data.confirmation_data.campaign_name : data.campaign_data.campaign_name;
		} else {
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaMycart@_getFeedDialogCampaignName: data.confirmation_data not found');
			}
		}
		if (sFeedDialogCampaignName !== ''){
			return sFeedDialogCampaignName;
		} else {
			return '';
		}
	},
	/**
	 * Devuelve el CampaignPK del producto
	 * @param {Object} info
	 * @param {Object} index
	 */
	_getFeedDialogCampaignPK: function (data, index){
		var nCampaignPk = '';
		if (data.order_products !== undefined) {
			nCampaignPk = data.order_products[index].ordline_FK_campaign_PK ;
		} else {
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaMycart@_getFeedDialogCampaignPK: data.order_products not found');
			}
		}
		if (nCampaignPk !== ''){
			return nCampaignPk;
		} else {
			return '';
		}
	},	
	/**
	 * Devuelve el Category del producto
	 * @param {Object} info
	 * @param {Object} index
	 */
	_getFeedDialogCategory: function (data, index){
		var nCategory = '';
		if (data.order_products !== undefined) {
			nCategory = data.order_products[index].product_category ;
		} else {
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaMycart@_getFeedDialogCategory: data.order_products not found');
			}
		}
		if (nCategory !== ''){
			return nCategory;
		} else {
			return '';
		}
	},	
	/**
	 * Devuelve el valor del titulo del dialogo a compartir
	 * @param {Object} data
	 * @param {Object} section
	 */
	_getFeedDialogCaption: function(){
		return Country.getIso() + '.privalia.com';
	},	
	/**
	 * Devuelve el valor del campo description que ha de aparecer al compartir en Facebook
	 * @param {Object} data
	 * @param {Object} section
	 */
	_getFeedDialogDescription: function (data, index){
		var oResData = data.getResData();
		if (!this.getIsAdultCampaign(oResData)){
			return encodeURI(this.getTxt('haveBought') + ' ' + this.replaceQuotesAndHtmlTags(this._getFeedDialogProductName(oResData, index)) + ' ' + this.getTxt('of') + ' ' + this._getFeedDialogCampaignName(oResData) + ' ' + this.getTxt('inPrivalia') + '. ' + this.getTxt('justUntil') + ' ' + this._getDeadLine(oResData) + '. ' + this.getTxt('resist'));
		} else {
			return encodeURI(data.getTxt('until') + ' ' + this._getDeadLine(oResData) + ' ' + data.getTxt('loseIt'));
		}
	},
	/**
	 * Asigna un Id de Aplicacion de Facebook segun el pais en el que nos encontremos
	 */
	_getFeedDialogId: function(){
		var nAppId = 123050457758183;
		switch (Country.getIso()) {
			case 'es':
				nAppId = this.code_EsAppId;
				break;
			case 'it':
				nAppId = this.code_ItAppId;
				break;
			case 'mex':
				nAppId = this.code_MexAppId;
				break;
			case 'br':
				nAppId = this.code_BrAppId;
				break;
			default:
		}
		return nAppId;	
	},
	/**
	 * Devuelve el valor de la imagen a mostrar al compartir en facebook
	 * @param {Object} data
	 */
	_getFeedDialogImage: function(data, index){
		var sFeedDialogPicture = '',
		oResData = data.getResData();
		if (oResData.order_products !== undefined) {
			sFeedDialogPicture = "http://" + Country.getIso() + ".privalia.com" + (oResData.order_products[index].prodf_imgpath_tn1 || oResData.order_products[index].prodf_imgpath);
		} else {
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaMycart@_getFeedDialogImage: data.order_products not found');
			}
		}
		if (sFeedDialogPicture !== ''){
			return sFeedDialogPicture;
		} else {
			return '';
		}
	},	
	/**
	 * Devuelve el Texto que ha de aparecer en el Nombre del Link en facebook
	 */
	_getFeedDialogName: function(data){
		var oResData = data.getResData();
		if (!this.getIsAdultCampaign(oResData)) {
			return encodeURI(this.getTxt('justBought'));
		} else {
			return encodeURI(this.getTxt('newCampaign'));
		}
	},
	/**
	 * Devuelve el link para Facebook, que corresponde con la ubicacion actual
	 * @param {Object} data
	 * @param {Object} index
	 */
	_getFeedDialogLink: function (data, index){
		var oResData = data.getResData(),
		sLink = Country.getIso() + "." + Country.getDomain() + "/microsites/fittingroom/campaign/" + this._getFeedDialogCampaignPK(oResData, index)  + "/category/" + this._getFeedDialogCategory(oResData, index) + "/product/" + this._getFeedDialogProductPK(oResData, index) + this.sFacebookTracking;
		return  sLink;
	},
	/**
	 * Setea los parametros que ha de contener el link hacia facebook
	 * @param {Object} index
	 */
	_getFeedDialogParameters: function (index){
		var http = 'http://www.facebook.com/dialog/feed?',
		app_id = 'app_id=' + this._getFeedDialogId() + '&',																							
		link = 'link=' + this._getFeedDialogLink(this, index) + '&',
		picture = 'picture=' + this._getFeedDialogImage(this, index) + '&',
		name = 'name=' + this._getFeedDialogName(this) + '&',																					//A Cambiar
		caption = 'caption=' + this._getFeedDialogCaption() + '&',							
		description = 'description=' + this._getFeedDialogDescription(this, index) + '&',
		display = 'diplay=popup&',
		redirect = 'redirect_uri=http://www.facebook.com',
		sFeedLink = http + app_id + link + picture + name + caption + description + display + redirect;															
		return sFeedLink;
	},
	/**
	 * Recuperamos el nombre del producto para el compartir en Facebook
	 * @param {Object} oData
	 * @param {Object} index
	 */
	_getFeedDialogProductName: function (oData, index){
		var sFeedDialogProductName = '';
		if (oData.order_products !== undefined) {
			sFeedDialogProductName = oData.order_products[index].ordline_description ;
		} else {
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaMycart@_getFeedDialogProductName: oData.order_products not found');
			}
		}
		if (sFeedDialogProductName !== ''){
			return sFeedDialogProductName;
		} else {
			return '';
		}
	},
	/**
	 * Devuelve el ProductPK del producto
	 * @param {Object} oData
	 * @param {Object} index
	 */
	_getFeedDialogProductPK: function (oData, index){
		var nProductPk = '';
		if (oData.order_products !== undefined) {
			nProductPk = oData.order_products[index].product_PK ;
		} else {
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaMycart@_getFeedDialogProductPK: oData.order_products not found');
			}
		}
		if (nProductPk !== ''){
			return nProductPk;
		} else {
			return '';
		}
	},	
	/**
	*  Mostrar condiciones cheque regalo cuando hay mas de un cheque
	*/
	_showConditionsChecks: function(){
		var vouchernumber = this.getVoucherNumber();
		if ($('js-conditionschecks') != null) {
			if ( vouchernumber > 1 ){		
				$('js-conditionschecks').removeClassName('hidden');
			}
			else {
				$('js-conditionschecks').addClassName('hidden');
			}
		}
	},
	/**
	 * Gestiona la seleccion de las direcciones de envio
	 */
	_setDefaultRadio: function(){
		var form = $(this.idSummaryAddress);
		var buttons = form.getInputs('radio', 'selectaddress');
		var firstRadioBtn = buttons.first();

		//Fijamos el Checked en la primera direccion
		firstRadioBtn.writeAttribute("checked", "checked");
		defaultId=firstRadioBtn.readAttribute("value");

		//Llamamos al cambio de direcciones
		var url='/mycart/changeDeliveryAddress';
		params = {parameters: "address_delivery="+defaultId};
		new Ajax.Request(url,params);
	},

	/**
	 * Gestionamos los inputs de seleccionar cheques
	 */
	_setInputsVouchers: function(){
		if ( $(this.idSelectVouchers) != null ){
		var inputsDisabled = $$('#'+this.idSelectVouchers + ' .disabled input'),
		inputsChecked =  $$('#'+this.idSelectVouchers + ' .checked input'),
		form = $(this.idSelectVouchers),
		buttons = form.getInputs('checkbox');
		// Desactivamos los inputs deshabilitados
		inputsDisabled.each(function(item) {
			$(item).writeAttribute("disabled", "disabled" );
		});
		//Marcamos como checked los activos
		inputsChecked.each(function(item) {
			$(item).writeAttribute("checked", "checked" );
		});
		}
	},
	/**
	*  Si hemos eliminado la ultima tarjeta preparamos el form de pago como nueva compra
	*/
    _setLastCreditCard: function() {
    	if($('js-seeCardsContent') != null){
    		$('js-seeCardsContent').hide();
		}
    	this.selectOtherMethod();
	},
	/**
	 * Ponemos el numero de cheques disponibles en el modal
	 */
	_setNumberOfVouchers: function() {
		var sNumVouchers = this.getResData().vouchers_total.vouchers_number,
		sTxtSingular = this.getTxt("singular"),
		sTxtPlural = this.getTxt("plural"),
		sTextVouchers = this.getTxtPlural(sNumVouchers, sTxtSingular, sTxtPlural);
		if( ($('js-numVouchers') != null) && ($('js-txtVouchers') != null) ){
			$('js-numVouchers').update(sNumVouchers);
			$('js-txtVouchers').update(sTextVouchers);
		}
	},
	
	/**
	 * Preparamos el modal de solo un cheque no seleccionable
	 */
	_setOneCheckModal: function() {
		var v_vouchers = this.getResData().vouchers_list,
		variusChecks = $$('.js-variusChecks'),
		oneCheck = $$('.js-oneCheck');
		// si solo hay un cheque y su estado no es 1 (disponible)
		if(v_vouchers.size() == 1 && v_vouchers[0].voucher_available != '1' && v_vouchers[0].voucher_available != '6'){
			// ocultamos todo lo referente a varios cheques para seleccionar marcado con la clase correspondiente
			variusChecks.each(function(item){
				$(item).hide();
			});
			// mostramos todo lo referente a solo un cheque marcado con la clase correspondiente
			oneCheck.each(function(item) {
				$(item).show();
			});
			this.b_isInOne = true;
		}
		// si vuelve a tener cheques disponibles volvemos a mostrar lo referente a varios cheques
		else if(this.b_isInOne){
			// mostramos todo lo referente a varios cheques para seleccionar marcado con la clase correspondiente
			variusChecks.each(function(item){
				$(item).show();
			});
			// ocultamos todo lo referente a solo un cheque marcado con la clase correspondiente
			oneCheck.each(function(item) {
				$(item).hide();
			});
			this.b_isInOne = false;
		}
	},
	
	/**
	 * Gestiona el comportamiento de los radio buttons
	 */
	_setRadioBehaviour: function(){
		var form = $(this.idSummaryAddress);
		var buttons = form.getInputs('radio', 'selectaddress');
		this.flag_radioRunning = false;

		buttons.each(function(item) {
			item.observe('click', (function () {
				if (this.flag_radioRunning != true ){
					this.flag_radioRunning = true;
					var url = '/mycart/changeDeliveryAddress';
					currentId = item.value;
					params = {
						parameters: "address_delivery=" + currentId,
						onComplete: (function(response) {
							this.parseResponse(response);
							if(this.statusOK()) {
								this.closeNotify();
								this.reload();
							}else{
								if (this.getResTextcodes() == this.code_zoneChange){
									this.notify(this.getResTextcodes());
								}
								this.reload();
							}
						}).bind(this)
					};

					new Ajax.Request(url,params);
				}
			}).bind(this));
		}, this);
	},
	/**
	 * Gestiona el comportamiento de los radio de tarjetas guardadas
	 */
	_setRadioCards: function() {
		var form = $('confirmPayment'),
		buttons = form.getInputs('radio'),
		firstRadioBtn = buttons.first();
		//Si no estamos recargando

		if(this.nSelectedCard == ''){
			//Seleccionamos la primera direccion
			firstRadioBtn.writeAttribute("checked", "checked");
			this.selectCard(firstRadioBtn.value);
		}else{
			//Si hemos refrescado, asignamos el checked al radio actual
			if($(this.nSelectedCard) != null){
				$(this.nSelectedCard).writeAttribute("checked", "checked");
				this.selectCard($(this.nSelectedCard).value);
			//Si no existiera marcamos el primero
			}else{
				firstRadioBtn.writeAttribute("checked", "checked");
			}
		}
	},
	/**
	 * Gestiona la direccion de envio seleccionada
	 */
	_setRadioCheck: function(){
		//Comprobamos el valor de la direccion dada
		var addressId = this.getResData().order_data.order_FK_memaddress_PK;

		//Si no estamos recargando, ejecutamos el siguiente codigo
		if(addressId == null) {
			// Selecciona la primera direccion de envio por defecto
			this._setDefaultRadio();
		}
		else {
			//Si hemos refrescado, asignamos el checked al radio actual
			try {
				$('delivery_ad_'+addressId).writeAttribute("checked", "checked");
			}
			catch(e) {
				// puede fallar porque el ID de la direccion que hay guardado ya no exista (borrado por ejemplo)
				// Selecciona la primera direccion de envio por defecto
				this._setDefaultRadio();
			}
		}

		//Cualquier cambio en la seleccion implica una llamada ajax y el refresco de pagina
		this._setRadioBehaviour();
	},
	/**
	 * Proceso ajax para eliminar una tarjeta
	 */
    _submitDeleteCreditCard: function(token, div) {
        if(token != '') {
            var othis = this;
            var url = '/mycart/deleteCreditCard';
            this.load(div);
            new Ajax.Request(url, {
                parameters: 'token=' + token,
                onComplete: (function(response) {
                    this.parseResponse(response);
                    if(this.statusOK()) {
                        // eliminar tarjeta
                    	if($(div) != null){
                    		$(div).puff({duration:0.5});
                    	}
                    	if(this.getResData().last_card == true){
                    		this._setLastCreditCard();
                    	}
                    }
                    othis.stopLoad();
                }).bind(this),
                onException: (function() {
                    this.stopLoad();
                }).bind(this),
                onFailure: (function() {
                    if (this.debug) {
                        console.log('fail');
                    }
                }).bind(this)
            });
        }
	},
	/**
	 * Sumbit para el formulario de modificar datos de tarjeta guardada en modal
	 */
	_submitEditCard: function (response) {
		this.parseResponse(response);
		if(this.statusOK()) {
			this.reverification();
			//si es ok el mensaje de notificacion se ha de mostrar en el formulario de pago
			this.setNotification('notification');
			this.notify(this.getResTextcodes());
		}
		else {
			// gestionar error del numero de tarjeta de credito
			if (Country.getIso()== 'it'){
				this._errorCardNumber('edit');
			}
		    //si hay errores el mensaje de notificacion se ha de mostrar en el formulario del modal
			this.setNotification('notificationEditCard');
			this.endSubmitError();
		}
		this.stopLoad();
	}
});


/**
 * PrivaliaMyCart - Common
 * =========================================
 * @modified: 	Marcos	(1-07-11)
 */
var PrivaliaMyCart = new Class.create(PrivaliaJsonMyCart, {
	initialize: function($super) {
		$super();

		this.idSummaryBox =			'summaryBox';
		this.methodSelect =			true; 			// nos dice si ha seleccionado un metodo de pago
		this.methodSelected =		'';				// nos dice que metodo ha seleccionado

		this.firstBuyFormOpened =	false;

		this.reopen_order =			false;			// flag temporal estatico para controlar en summary si se reabre un pedido

		this.url_confirmation =		URL_DOMAIN + '/mycart/confirmation';
		this.url_summary =			URL_SECURE + '/mycart/summary';

		this.txt_connecting =		'connecting';
		this.txt_processingPayment ='processing payment';

		this.deldiv = 				'';
		this.delpk =				'';

		this.idPaymentForm =		'paymentFormFields';			// Id de la div que contiene los campos del formulario de tarjeta de credito y factura

		this.billAddress =			'billing_dir';					// direccion de facturacion
		this.billPostalCode =		'billing_cp';					// codigo postal de la factura
		this.billCity =				'billing_city';					// ciudad de la factura
		this.billMexState =			'billing_state';				// estado de la factura
		this.billState =			'county_field';					// provincia de la factura de momento exclusivo de ITALIA

		this.idRequestInvoice =		'request_invoice_link';			// Id del link de solicitar factura
		this.inputRequestInvoice =	'request_invoice';				// Id del input de solicitar factura
		this.idInvoiceFields =		'invoiceFields';				// Id de la div contenedora de los campos para solicitar factura

		this.inputCardNumber =		'card_number';					// Id del input hidden del nº de tarjeta de crédito.
		this.inputCardNumberEdit =	'card_number_edit';				// Id del input hidden del nº de tarjeta de crédito en el modal de editar.

		this.noLink =				'.nolink';				// clase que se utiliza para designar los elementos link y controlar cuando es linkable

		//version
    	this.version =				3.2;					//modificar version al crear un nuevo metodo
    	this.setVersion(this.version, 'PrivaliaMyCart');
	},

	/**
	 * Muestra el formulario de pago y los campos de solicitar factura
	 */
	activeFormPayment: function () {
		// quitamos la opacidad al formulario
		$(this.idPaymentForm).removeClassName('disable');
		// habilitamos el formulario
		Form.enable(this.idPaymentForm);
		// asignamos la propiedad onclick a los links de tooltip de cvv y pedir factura
		$$(this.noLink).each(function(item){
			// si el atributo onclick existe y esta vacio
			if($(item).hasAttribute('onclick') && $(item).readAttribute('onclick') == ''){
				// contenido onclick del link solicitar factura
				if(item.id != '' && item.id == 'request_invoice_link'){
					$(item).writeAttribute("onclick", "Data.setRequestInvoice();" );
				}
			}
		},this);
	},

	/**
	 * Modal de cada producto del listado de pedidos - confirmation, ficha producto
	 */
	transferProductInfo: function(oProduct, modal, section) {
		var idProduct = oProduct.id.split("-")[1],
		data = this.getResData();
		if(idProduct != '') {
			if (data != null){
				if (section !== 'summary'){
					this._transferSharingArea(oProduct);
					this._initAddthisArea(data);
					$('share-txt-text').removeClassName('hidden');
				}
				// recopilamos info del data json
				o_infoProduct = data.order_products[idProduct];
				o_infoCampaign = data.order_data;
				// volcamos info
				this._buildModalProductInfo(o_infoProduct, o_infoCampaign);
				// abrimos modal
				modal.open();
			}
		}
	},

	/**
	 *  Activamos metodos de pago
	 */
	activePayment: function (id,form,btn){

		var s_id = "";
		var options = $$('select#'+ id + ' option');
		options.each(function(item) {
			if($(item).selected == true){
				s_id = item.id;
			}
		});

		//ocultamos los formularios con esta clase
		var forms = $$('.form-payment-method');
		forms.each(function(item) {
			if(!$(item).hasClassName('hidden')){
				$(item).addClassName('hidden');
			}
		});
		// en caso de que el metodo de pago sea paypal cerramos formulario
		if(s_id == 'payment_paypal'){
			// ocultamos el formulario de pago
			this.disableFormPayment(this.idPaymentForm);
		}
		else{
			this.activeFormPayment();
		}
		// activamos metodo de pago
		this.activePaymentMethod(s_id);
	},

	/**
	 * Activamos el logo que el usuario haya seleccionado
	 */
	activePaymentMethod: function (id) {
		this.methodSelected = id;

		// Para espanya y brasil hay que controlar si se ha seleccionado visa o amex
		if (Country.getIso()== 'es' || Country.getIso()== 'br') {
			// se realiza un clear de los campos card_number y cvv2
			$('card_number').value='';
			$('cvv2').value='';
			if (this.methodSelected=='payment_amex')
			{
				// para amex el card_number es de 15 y el cvv2 de 4
				$('card_number').writeAttribute("maxlength", "15" );
				$('cvv2').writeAttribute("maxlength", "4" );
			}
			else {
					// para visa y master el card_number es de 16 y el cvv2 de 3
					$('card_number').writeAttribute("maxlength", "16" );
					$('cvv2').writeAttribute("maxlength", "3" );
			}
		}

		//quitamos la clase active de todos los logos excepto el de visa que es la opcion predeterminada
		var logos = $$('.payment');
		logos.each(function(rem_act) {
			rem_act.removeClassName('active');
		});
		//anadimos la clase active al logo correspondiente al metodo de pago
		var logo_id=id;
		logo_id='logo_'+logo_id;
		$(logo_id).addClassName('active');
		//el focus lo realizara si es diferente de IE7/IE8
		if(!this.checkUserAgent("msie")) {
			$('card_number').focus();
		}
	},

	/**
	 * Proceso para cambiar la cantidad de un producto
	 */
	changeQuantity: function(pk,select) {
		// recogemos la id del select donde se ha realizado la accion
		this.idQuantitySelect = select.id;

		this._callChangeQuantity(pk, select);
	},

	/**
	 * Proceso para cambiar la talla de un producto
	 */
	changeSize: function(ordline_PK, select) {
		this._callChangeSize(ordline_PK, select);
	},

	/**
	 * TODO: En desarrollo
	 * Comprueba si tiene el flag de ampliar pedido a true (muestra mas info del pedido a ampliar)
	 */
	checkReopenOrderSummary: function () {
		if (this.reopen_order) {
			$('reopen-order').removeClassName('hidden');
		}
	},

	/**
	 * Comprueba si tiene el flag de aceptar condiciones (para venta de servicios)
	 */
	checkConditions: function (checkbox, modal) {
		if (Country.getService()) {
			if ( !Object.isUndefined(this.getResData().campaign_data) ) {
				if(this.getResData().campaign_data.campaign_product_types.service == '1'){
					if ($(checkbox).checked == true) {
						$(checkbox).checked = false;
						//Comprobar que se pueda abrir
						if(!modal.isOpen){
						modal.open();
					}
				}
			}
		}
		}
	},

	/**
	 * Proceso para eliminar un producto donde delpk es el id del producto y deldiv la div contenedora
	 */
	deleteOrderLine: function(pk, div) {
		/*
		if(!Object.isUndefined(this.modalDeleteOrderLine)) {
			this.modalDeleteOrderLine.close();
		}
		*/
		if(arguments.length > 0) {
			this.delpk = pk;
			this.deldiv = div;
		}

		this._callDeleteOrderLine(this.delpk, this.deldiv);
	},

	/**
	 * Tooltip al hacer clic en la cantidad de un producto cuando solo queda uno.
	 */
	tooltipOnlyOneLeft: function (target, content) {
		// creamos tooltip
		var Tip = new PrivaliaTooltip(target, content, {
			type: 'html',
			status: 'warning',
			autoClose:	3,
			target: 'b',
			tip: 'tl',
			on:	'click',
			closeBtn: false,
			width: "230px"
	    });
		Tip.autoCloseEvent();
	},
	/**
	 * Abre el modal que se encuentra en el backbone para eliminar un producto y almacena tanto id del producto como la div a eliminar
	 */
	deleteOrderLineModal: function(modal, pk, div) {
		this.modalDeleteOrderLine = modal;
		modal.open();
		this.delpk = pk;
		this.deldiv = div;
	},

	/**
	 * Abre el modal que se encuentra en el backbone para vaciar la cesta
	 */
	emptyCart: function (modal) {
		this.modalEmptyCart = modal;
		modal.open();
	},

	/**
	 * Aplica la clase disableButton que desahabilita un boton
	 *
	 */
	disableButtonPayment: function (btn) {
		var button=btn;
		$(button).addClassName('disableButton');
		//$(button).writeAttribute("href", "javascript:void(0)").writeAttribute("onclick", this.submitPayment('confirmPayment'));
		this.methodSelect = false;
	},

	/**
	 * Oculta el formulario de pago
	 */
	disableFormPayment: function (id) {
		// le damos opacidad al formulario
		$(id).addClassName('disable');
		//$(id).setOpacity(0.5);
		// deshabilitamos el formulario
		Form.disable(id);
		// quitamos la propiedad onclick a los links de pedir factura y tooltip de cvv
		$$(this.noLink).each(function(item){
			item.writeAttribute("onclick", '');
		});
	},

	/**
	 * Abre el formulario para que el usuario introduzca los datos minimos requeridos para realizar una compra
	 * Datos + Form
	 */
	openFormRequiredData: function (PJson, modal) {
		if(!this.firstBuyFormOpened) {
			// cargar datos del formulario
			PJson.getData('/myaccount/getRequiredUserData', 'firstbuyForm');

			// selects del formulario
			PJson.getDataSelect('memaddress_street_type');
			PJson.getDataSelect('memaddress_adtype');
			PJson.getDataSelect('memaddress_street_number_type');

			this.firstBuyFormOpened = true;
		}

		// abrir el modal
		modal.open();
	},

	/**
	 * Asigna a la direccion de facturacion la que se haya escogido para la entrega
	 */
	putDeliveryAddress: function(){
		// comprobamos que exista una direccion seleccionada
		if($$('.addressRadio input[checked=checked]') != null){
			// Recogemos los datos a volcar

			// buscamos el input seleccionado que corresponde a la direccion de envio
			var selectedAddress = $$('.addressRadio input[checked=checked]');
			// si esta vacio
			if(selectedAddress == ''){
				// caso de reabrir pedido en el que no existe el radio checked pero si una direccion unica
				selectedAddress = $$('.addressRadio input');
			}
			// volcamos el valor del input que es el que nos dara la pk de la direccion
			selectedAddress = selectedAddress[0].value ;
			// recogemos el valor del tipo de via
			var selectedAddresDescription =	$('adstatic_' + selectedAddress + '_street_description').innerHTML;
			// recogemos el valor del nombre de la via
			var selectedAddresName = $('adstatic_' + selectedAddress + '_street_name').innerHTML;
			// recogemos el valor del numero de la via
			var selectedAddresNumber = $('adstatic_' + selectedAddress + '_street_number').innerHTML;

			// recogemos los que sera la direccion de facturacion
			var billAddress = selectedAddresDescription + " " + selectedAddresName + " " + selectedAddresNumber;

			// recogemos el valor del codigo postal
			var selectedPostalCode =	$('adstatic_' + selectedAddress + '_zipcode').innerHTML;
			// recogemos el valor de la ciudad
			var selectedCity = $('adstatic_' + selectedAddress + '_city').innerHTML;
			// recogemos el valor de la provincia
			var selectedAddresState = $('adstatic_' + selectedAddress + '_state').innerHTML;

			// Volcamos los datos recogidos

			if (Country.getIso() != 'it') {
				// codigo postal
				$(this.billPostalCode).value = selectedPostalCode;
				// ciudad
				$(this.billCity).value = selectedCity;
			}
			else if(Country.getIso() == 'mex'){
				// estado
				$(this.billMexState).value = selectedAddresState;
			}
			else{
				// cambiamos la id de la direccion de facturacion en caso de ser italia
				this.billAddress = 'bussiness_address';
				// provincia
				$(this.billState).value = selectedAddresState;
			}

			// direccion de facturacion
			$(this.billAddress).value = billAddress;
		}

	},

	/**
	 * Redirige a la pagina de confirmacion
	 */
	redirectToConfirmation: function () {
		document.location.href = this.url_confirmation;
	},

	redirectToSummary: function () {
		document.location.href = this.url_summary;
	},

	/**
	 * En caso de pago con Paypal, se redirige a la pagina correspondiente
	 */
	redirectToPayPal: function () {
		var url = this.getResData().paypal_data.redirect_url;
		if(url != '') {
			this.loadText(this.txt_connecting);
			document.location.href = url;
		}
	},

	/**
	 * En Italia, rellena el hidden card_number con los valores que se van insertando en las 4 celdas card_number(n).
	 */
	setCardName: function (idinputCardNumber, nPos){
		var inputCardNumberHidden =  this.inputCardNumber,
		form = idinputCardNumber.form.id,
		sSufix = '';
		// si estamos dentro del formulario de editar tarjeta
		if (form == 'editCard'){
			inputCardNumberHidden =  this.inputCardNumberEdit;
			sSufix = '_edit';
		}
		$(inputCardNumberHidden).setValue($('card_number1' +sSufix).value + $('card_number2' +sSufix).value + $('card_number3' +sSufix).value + $('card_number4' +sSufix).value);

		// Miramos si se han insertado ya 4 dígitos en el input.
		if (idinputCardNumber.value.length == 4) {
			// Recogemos la posición del input.
			//var iPos = idinputCardNumber.id.split("card_number" +sSufix)[1];

			// si no es el último input, envíaremos el foco al siguiente.
			if (nPos < 4) {
				nPos++;
				$('card_number' + nPos + sSufix).focus();
				$('card_number' + nPos + sSufix).select();
			}
		}
	},

	/**
	 * Controla: - muestra o oculta el form de solicitar factura
	 * 			 - si el input oculto de solicitar factura esta activado o desactivado
	 */
	setRequestInvoice: function(){
		// Mostramos o ocultamos los campos del formulario para solicitar factura
		$(this.idInvoiceFields).toggleClassName('hidden');
		// Agregamos o quitamos la clase css que nos servira como flag para saber si se solicita una factura o no
		$(this.idRequestInvoice).toggleClassName('yes');

		// buscamos si existe la clase yes que indica que se requiere una factura
		if($(this.idRequestInvoice).hasClassName('yes')){
			// si existe cambia el valor del input de solicitar factura a 1
			$(this.inputRequestInvoice).setValue(1);
		}
		else{
			// si no existe cambia el valor del input de solicitar factura a 0
			$(this.inputRequestInvoice).setValue(0);
		}
	},

	/**
	 * Submit personalizado para vaciar carrito
	 */
	submitEmptyCart: function(idForm, onComplete) {
		if(onComplete != null) {
			this.submit(idForm, onComplete);
		}
		else {
			this.submit(idForm, this._endSubmitEmptyCart.bind(this));
		}
	},

	/**
	 * Sumbit para el formulario de pago
	 * Si el pago es correcto y el metodo no es PayPal, redirige a la pagina de confirmacion
	 * Si el metodo es Paypal, redirige al link proporcionado
	 */
	submitPayment: function(idForm) {
		if(this.methodSelect) {
			this.submit(idForm, this._submitPayment.bind(this));
		}
	},

	/**
	 * Sumbit para el formulario de datos requeridos
	 * Si el pago es correcto redirige a la pagina de summary
	 */
	submitRequiredUserData: function(idForm) {
		this.submit(idForm, this._submitRequiredUserData.bind(this));
	},

	/**
	 * Volcado de la informacion del producto y la campaña
	 */
	_buildModalProductInfo: function(o_infoProduct, o_infoCampaign) {
		//en la tpl esta oculto para que no se vea el salto de tabs que deben de aparecer y tabs que no
		if ( $('tabs') != null ){
			$('tabs').removeClassName('hidden');
		}
		// info producto
		if ( $('product-desc') != null && $('image-product') != null ) {
			$('product-desc').update(o_infoProduct.ordline_description);
			$('image-product').src = o_infoProduct.prodf_imgpath_ab1;
		}
		if ( $('price-shop') != null && $('price-privalia') != null ) {
			$('price-shop').update(o_infoProduct.prodf_pvp);
			$('price-privalia').update(o_infoProduct.ordline_price);
		}

		if ( $('tab-description') != null && $('tab-moreinfo') != null ) {
			$('tab-description').update(o_infoProduct.prodf_description);
			$('tab-moreinfo').update(o_infoProduct.prodf_more_info);
		}

		// info campana
		if ( $('campaign-name') != null && $('campaign-logo') != null ) {
			$('campaign-name').update(o_infoCampaign.campaign_name);
			$('campaign-logo').src = o_infoCampaign.campaign_logo;
		}

		//Parcelados.
		//Si es 0 no hay parcelados, es decir no es BR
		//Si es > 0 hay parcelados y tambien se muestra la pestaña,tab de parcelados
		if ( $('mdl-installments') != null && $('mdl-no-installments') != null && $("installments-price-privalia") != null && $("btnInstallments") != null) {
			if (o_infoProduct.order_installments > 0){
				$("mdl-no-installments").addClassName("hidden");
				$("mdl-installments").removeClassName("hidden");
				var installment = o_infoProduct.order_installments +"x " + o_infoProduct.product_price_with_installments;
				$("price-installments").update(installment);
				$("installments-price-privalia").update(o_infoProduct.ordline_price);
				$("btnInstallments").removeClassName("hidden");
			}
		}
	},

	/**
	 * Proceso ajax para cambiar la cantidad
	 */
	_callChangeQuantity: function(pk, select) {
		if(pk != '') {
			var url = '/mycart/changeQuantity';
			var params = 'product=' + pk + '&quantity=' + $F(select);

			this._callChangeSummary(url, params);
		}
	},

	/**
	 * Proceso ajax para cambiar la talla
	 */
	_callChangeSize: function (ordline_PK, select) {
		if(ordline_PK != '') {
			var url = '/mycart/changeSize';
			var params = 'ordline=' + ordline_PK + '&product=' + $F(select);

			this._callChangeSummary(url, params);
		}
	},

	/**
	 * Realizar un cambio en el summary y actualizar los datos
	 */
	_callChangeSummary: function (url, params) {
		this.load();
		this.closeNotify();

		new Ajax.Request(url, {
			parameters: params,
			onComplete: (function(response) {
				this.parseResponse(response);
				if(this.statusOK()) {
					this.reload();
				}
				else {
					// redesign - eliminamos el metodo que controla ocultar los pasos de compra porque ya no se oculta nada
					//this.setContinueBuying(false);
					// redesign - notificamos el error de cantidad maxima excedida al cambiarla en el combo
					this.exceedMaxQuantity();
					this.stopLoad();
				}
			}).bind(this),

			onException: (function() {
				this.stopLoad();
			}).bind(this),

			onFailure: (function() {
				this.stopLoad();
				if (this.debug) {
					this.errorMessage('02');
				}
			}).bind(this)
		});
	},

	/**
	 * Proceso ajax para eliminar un producto
	 */
	_callDeleteOrderLine: function (pk, div) {
		if(pk != '') {
			var url = '/mycart/deleteProduct';

			new Ajax.Request(url, {
				parameters: 'product=' + pk,
				onComplete: (function(response) {
					this.parseResponse(response);
					if(this.statusOK()) {
						this.numProducts--;
						// eliminar direccion de la pagina html
						this._deleteOrderLineHtml(div);
						// actualizar summary
						this.reload();
						// actualizar el carrito
						MH.reload();
					}
				}).bind(this),
				onFailure: (function() {
					if(this.debug) this.errorMessage('03');
				}).bind(this)
			});
		}
	},

	/**
	 * Quita la fila "id" de la tabla
	 */
	_deleteOrderLineHtml: function (id) {
		if(id != '') {
			$(id).remove();
		}
	},

	/**
	 * Funcion generica que se ejecuta tras realizar un vaciar cesta (submitEmptyCart)
	 */
	_endSubmitEmptyCart: function(response) {
		this.parseResponse(response);
		if(this.statusOK()) {
			// oculta el msg de vaciar cesta y muestra el msg de cesta vacia
			$('emptyCart').hide();
			$('emptyCartOk').show();
		}
		else {
			this.endSubmitError();
		}
		this.stopLoad();
		this.stopTimeout();
	},
	
	/**
	 * Esto gestiona el campo del numero de tarjeta de credito que esta dividido en 4 campos separados
	 * Tenemos este caso en el form de Italia
	 * Si el campo hidden tiene un error, manualmente hay que marcar como error los 4 capmos separados
	 */
	_errorCardNumber: function (form) {
		var b_error = true;
		var dataErrors = this.getResData().errors;
		
		if (dataErrors != undefined){
			var v_inputs = Object.keys(dataErrors);
			var sError = dataErrors.card_number;
			var sSuf = '';

		if(form != undefined && form == 'edit'){
			sError = dataErrors.card_number_edit;
			sSuf = '_edit';
		}
		if(v_inputs.indexOf('card_number' + sSuf) >= 0) {
			this._errorField('card_number1' + sSuf, '');
			this._errorField('card_number2' + sSuf, '');
			this._errorField('card_number3' + sSuf, '');
			this._errorField('card_number4' + sSuf, sError);
		}
		}

	},
	
	/**
	 * Inicializa las areas de compartir de las modales de producto en confirmacion
	 * @param {Object} data
	 */
	_initAddthisArea: function(data){
		var sAddthisInitCommand = '',
		nOrderLength = data.order_products.length;

		if (typeof(addthis) != 'undefined'){
			for (var i = 0; i < nOrderLength; i++){
				addthis.toolbox(".addthis" + i, {}, window['addthis' + i + '_share']);
			}
		} else {
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaMycart@_initAddthisArea: addthis object not found');
			}
		}
	},
	
	/**
	 * TODO - A Comentar
	 * @param {Object} response
	 */
	_submitRequiredUserData: function (response) {
		this.parseResponse(response);
		if(this.statusOK()) {
			// redirigir al summary
			this.redirectToSummary();
		}
		else {
			this.endSubmitError();
		}
		this.stopLoad();
		this.stopTimeout();
	},
	
	/**
	 * callback del SUBMIT del formulario de pago
	 */
	_submitPayment: function (response) {
		$('confirmPaymentButton').addClassName('disableButton');
		this.parseResponse(response);
		if(this.statusOK()) {
			this.loadText(this.txt_processingPayment);
			if(this.methodSelected == 'payment_paypal') {
				this.redirectToPayPal();
			}
			else {
				this.redirectToConfirmation();
			}
		}
		else {
			if($('confirmPaymentButton')!== null){
				$('confirmPaymentButton').removeClassName('disableButton');
			}
			
			// gestionar error del numero de tarjeta de credito
			if (Country.getIso()== 'it'){
				this._errorCardNumber();
			}			
			if (Country.getOneClickPayment()){
				this._errorCreditCard();
			}
			this.endSubmitError();
		}
		this.stopLoad();
		this.stopTimeout();
	},
			
	_errorCreditCard: function () {
		var error = this.getResTextcodes();
		if(error === this.code_expiredCreditCard  || error === this.code_olderCreditCard || error === this.code_invalidCreditCard){
			this.reverificationForm($(this.sIdStoredCardInput).value);
		}
	},
	_submitRequiredUserData: function (response) {
		this.parseResponse(response);
		if(this.statusOK()) {
			// redirigir al summary
			this.redirectToSummary();
		}
		else {
			this.endSubmitError();
		}
		this.stopLoad();
		this.stopTimeout();
	},

	/**
	 * Transfiere el area de compartir desde la linea de orden de la confirmacion
	 * hasta la modal del producto
	 */
	_transferSharingArea: function(oProduct){
		$('sheet-share').update('');
		var addthis = oProduct.up(1).down('.addthis_toolbox');
		if (addthis) {
			addthis.up().removeClassName('hidden');
			var sharingObj = addthis.clone('deep');
			addthis.up().addClassName('hidden');
			$('sheet-share').insert({
				bottom: sharingObj
			});
			$$('.share-txt').each(function(obj) {
				obj.removeClassName('hidden');
			});

		} else {
			$$('.share-txt').each(function(obj) {
				obj.addClassName('hidden');
			});
		}
	}


});

// CalendarDateSelect version 1.15 - a prototype based date picker
// Questions, comments, bugs? - see the project page: http://code.google.com/p/calendardateselect
if (typeof Prototype == 'undefined') alert("CalendarDateSelect Error: Prototype could not be found. Please make sure that your application's layout includes prototype.js (.g. <%= javascript_include_tag :defaults %>) *before* it includes calendar_date_select.js (.g. <%= calendar_date_select_includes %>).");
if (Prototype.Version < "1.6") alert("Prototype 1.6.0 is required.  If using earlier version of prototype, please use calendar_date_select version 1.8.3");

Element.addMethods({
  purgeChildren: function(element) { $A(element.childNodes).each(function(e){$(e).remove();}); },
  build: function(element, type, options, style) {
    var newElement = Element.buildAndAppend(type, options, style);
    element.appendChild(newElement);
    return newElement;
  }
});

Element.buildAndAppend = function(type, options, style)
{
  var e = $(document.createElement(type));
  $H(options).each(function(pair) { e[pair.key] = pair.value });
  if (style) e.setStyle(style);
  return e;
};
nil = null;

Date.one_day = 24*60*60*1000;
Date.weekdays = $w("S M T W T F S");
Date.first_day_of_week = 0;
Date.months = $w("January February March April May June July August September October November December" );
Date.padded2 = function(hour) { var padded2 = parseInt(hour, 10); if (hour < 10) padded2 = "0" + padded2; return padded2; }
Date.prototype.getPaddedMinutes = function() { return Date.padded2(this.getMinutes()); }
Date.prototype.getAMPMHour = function() { var hour = this.getHours(); return (hour == 0) ? 12 : (hour > 12 ? hour - 12 : hour ) }
Date.prototype.getAMPM = function() { return (this.getHours() < 12) ? "AM" : "PM"; }
Date.prototype.stripTime = function() {return new Date(this.getFullYear(), this.getMonth(), this.getDate());};
Date.prototype.daysDistance = function(compare_date) { return Math.round((compare_date - this) / Date.one_day); };
Date.prototype.toFormattedString = function(include_time){
  var hour, str;
  str = Date.months[this.getMonth()] + " " + this.getDate() + ", " + this.getFullYear();
  
  if (include_time) { hour = this.getHours(); str += " " + this.getAMPMHour() + ":" + this.getPaddedMinutes() + " " + this.getAMPM() }
  return str;
}
Date.parseFormattedString = function(string) { return new Date(string);}
Math.floor_to_interval = function(n, i) { return Math.floor(n/i) * i;}
window.f_height = function() { return( [window.innerHeight ? window.innerHeight : null, document.documentElement ? document.documentElement.clientHeight : null, document.body ? document.body.clientHeight : null].select(function(x){return x>0}).first()||0); }
window.f_scrollTop = function() { return ([window.pageYOffset ? window.pageYOffset : null, document.documentElement ? document.documentElement.scrollTop : null, document.body ? document.body.scrollTop : null].select(function(x){return x>0}).first()||0 ); }

_translations = {
  "OK": "OK",
  "Now": "Now",
  "Today": "Today",
  "Clear": "Clear"
}
SelectBox = Class.create();
SelectBox.prototype = {
  initialize: function(parent_element, values, html_options, style_options) {
    this.element = $(parent_element).build("select", html_options, style_options);
    this.populate(values);
  },
  populate: function(values) {
    this.element.purgeChildren();
    var that = this; $A(values).each(function(pair) { if (typeof(pair)!="object") {pair = [pair, pair]}; that.element.build("option", { value: pair[1], innerHTML: pair[0]}) });
  },
  setValue: function(value) {
    var e = this.element;
    var matched = false;
    $R(0, e.options.length - 1 ).each(function(i) { if(e.options[i].value==value.toString()) {e.selectedIndex = i; matched = true;}; } );
    return matched;
  },
  getValue: function() { return $F(this.element)}
}
CalendarDateSelect = Class.create();
CalendarDateSelect.prototype = {
  initialize: function(target_element, options) {
    this.target_element = $(target_element); // make sure it's an element, not a string
    if (!this.target_element) { alert("Target element " + target_element + " not found!"); return false;}
    if (this.target_element.tagName != "INPUT") this.target_element = this.target_element.down("INPUT")
    
    this.target_element.calendar_date_select = this;
    this.last_click_at = 0;
    // initialize the date control
    this.options = $H({
      embedded: false,
      popup: nil,
      time: false,
      buttons: true,
      clear_button: true,
      year_range: 10,
      close_on_click: nil,
      minute_interval: 5,
      popup_by: this.target_element,
      month_year: "dropdowns",
      onchange: this.target_element.onchange,
      valid_date_check: nil
    }).merge(options || {});
    this.use_time = this.options.get("time");
    this.parseDate();
    this.callback("before_show")
    this.initCalendarDiv();
    if(!this.options.get("embedded")) {
      this.positionCalendarDiv()
      // set the click handler to check if a user has clicked away from the document
      Event.observe(document, "mousedown", this.closeIfClickedOut_handler = this.closeIfClickedOut.bindAsEventListener(this));
      Event.observe(document, "keypress", this.keyPress_handler = this.keyPress.bindAsEventListener(this));
    }
    this.callback("after_show")
  },
  positionCalendarDiv: function() {
    var above = false;
    var c_pos = this.calendar_div.cumulativeOffset(), c_left = c_pos[0], c_top = c_pos[1], c_dim = this.calendar_div.getDimensions(), c_height = c_dim.height, c_width = c_dim.width; 
    var w_top = window.f_scrollTop(), w_height = window.f_height();
    var e_dim = $(this.options.get("popup_by")).cumulativeOffset(), e_top = e_dim[1], e_left = e_dim[0], e_height = $(this.options.get("popup_by")).getDimensions().height, e_bottom = e_top + e_height;
    
    if ( (( e_bottom + c_height ) > (w_top + w_height)) && ( e_bottom - c_height > w_top )) above = true;
    var left_px = e_left.toString() + "px", top_px = (above ? (e_top - c_height ) : ( e_top + e_height )).toString() + "px";
    
    this.calendar_div.style.left = left_px;  this.calendar_div.style.top = top_px;
    
    this.calendar_div.setStyle({visibility:""});
    
    // draw an iframe behind the calendar -- ugly hack to make IE 6 happy
    if(navigator.appName=="Microsoft Internet Explorer") this.iframe = $(document.body).build("iframe", {src: "javascript:false", className: "ie6_blocker"}, { left: left_px, top: top_px, height: c_height.toString()+"px", width: c_width.toString()+"px", border: "0px"})
  },
  initCalendarDiv: function() {
    if (this.options.get("embedded")) {
      var parent = this.target_element.parentNode;
      var style = {}
    } else {
      var parent = document.body
      var style = { position:"absolute", visibility: "hidden", left:0, top:0 }
    }
    this.calendar_div = $(parent).build('div', {className: "calendar_date_select"}, style);
    
    var that = this;
    // create the divs
    $w("top header body buttons footer bottom").each(function(name) {
      eval("var " + name + "_div = that." + name + "_div = that.calendar_div.build('div', { className: 'cds_"+name+"' }, { clear: 'left'} ); ");
    });
    
    this.initHeaderDiv();
    this.initButtonsDiv();
    this.initCalendarGrid();
    this.updateFooter("&#160;");
    
    this.refresh();
    this.setUseTime(this.use_time);
  },
  initHeaderDiv: function() {
    var header_div = this.header_div;
    this.close_button = header_div.build("a", { innerHTML: "x", href:"#", onclick:function () { this.close(); return false; }.bindAsEventListener(this), className: "close" });
    this.next_month_button = header_div.build("a", { innerHTML: "&gt;", href:"#", onclick:function () { this.navMonth(this.date.getMonth() + 1 ); return false; }.bindAsEventListener(this), className: "next" });
    this.prev_month_button = header_div.build("a", { innerHTML: "&lt;", href:"#", onclick:function () { this.navMonth(this.date.getMonth() - 1 ); return false; }.bindAsEventListener(this), className: "prev" });
    
    if (this.options.get("month_year")=="dropdowns") {
      this.month_select = new SelectBox(header_div, $R(0,11).map(function(m){return [Date.months[m], m]}), {className: "month", onchange: function () { this.navMonth(this.month_select.getValue()) }.bindAsEventListener(this)}); 
      this.year_select = new SelectBox(header_div, [], {className: "year", onchange: function () { this.navYear(this.year_select.getValue()) }.bindAsEventListener(this)}); 
      this.populateYearRange();
    } else {
      this.month_year_label = header_div.build("span")
    }
  },
  initCalendarGrid: function() {
    var body_div = this.body_div;
    this.calendar_day_grid = [];
    var days_table = body_div.build("table", { cellPadding: "0px", cellSpacing: "0px", width: "100%" })
    // make the weekdays!
    var weekdays_row = days_table.build("thead").build("tr");
    Date.weekdays.each( function(weekday) { 
      weekdays_row.build("th", {innerHTML: weekday});
    });
    
    var days_tbody = days_table.build("tbody")
    // Make the days!
    var row_number = 0, weekday;
    for(var cell_index = 0; cell_index<42; cell_index++)
    {
      weekday = (cell_index+Date.first_day_of_week ) % 7;
      if ( cell_index % 7==0 ) days_row = days_tbody.build("tr", {className: 'row_'+row_number++});
      (this.calendar_day_grid[cell_index] = days_row.build("td", {
          calendar_date_select: this,
          onmouseover: function () { this.calendar_date_select.dayHover(this); },
          onmouseout: function () { this.calendar_date_select.dayHoverOut(this) },
          onclick: function() { this.calendar_date_select.updateSelectedDate(this, true); },
          className: (weekday==0) || (weekday==6) ? " weekend" : "" //clear the class
        },
        { cursor: "pointer" }
      )).build("div");
      this.calendar_day_grid[cell_index];
    }
  },
  initButtonsDiv: function()
  {
    var buttons_div = this.buttons_div;
    if (this.options.get("time"))
    {
      var blank_time = $A(this.options.get("time")=="mixed" ? [[" - ", ""]] : []);
      buttons_div.build("span", {innerHTML:"@", className: "at_sign"});
      
      var t = new Date();
      this.hour_select = new SelectBox(buttons_div,
        blank_time.concat($R(0,23).map(function(x) {t.setHours(x); return $A([t.getAMPMHour()+ " " + t.getAMPM(),x])} )),
        { 
          calendar_date_select: this, 
          onchange: function() { this.calendar_date_select.updateSelectedDate( { hour: this.value });},
          className: "hour" 
        }
      );
      buttons_div.build("span", {innerHTML:":", className: "seperator"});
      var that = this;
      this.minute_select = new SelectBox(buttons_div,
        blank_time.concat($R(0,59).select(function(x){return (x % that.options.get('minute_interval')==0)}).map(function(x){ return $A([ Date.padded2(x), x]); } ) ),
        { 
          calendar_date_select: this, 
          onchange: function() { this.calendar_date_select.updateSelectedDate( {minute: this.value }) }, 
          className: "minute" 
        }
      );
      
    } else if (! this.options.get("buttons")) buttons_div.remove();
    
    if (this.options.get("buttons")) {
      buttons_div.build("span", {innerHTML: "&#160;"});
      if (this.options.get("time")=="mixed" || !this.options.get("time")) b = buttons_div.build("a", {
          innerHTML: _translations["Today"],
          href: "#",
          onclick: function() {this.today(false); return false;}.bindAsEventListener(this)
        });
      
      if (this.options.get("time")=="mixed") buttons_div.build("span", {innerHTML: "&#160;|&#160;", className:"button_seperator"})
      
      if (this.options.get("time")) b = buttons_div.build("a", {
        innerHTML: _translations["Now"],
        href: "#",
        onclick: function() {this.today(true); return false}.bindAsEventListener(this)
      });
      
      if (!this.options.get("embedded") && !this.closeOnClick())
      {
        buttons_div.build("span", {innerHTML: "&#160;|&#160;", className:"button_seperator"})
        buttons_div.build("a", { innerHTML: _translations["OK"], href: "#", onclick: function() {this.close(); return false;}.bindAsEventListener(this) });
      }
      if (this.options.get('clear_button')) {
        buttons_div.build("span", {innerHTML: "&#160;|&#160;", className:"button_seperator"})
        buttons_div.build("a", { innerHTML: _translations["Clear"], href: "#", onclick: function() {this.clearDate(); if (!this.options.get("embedded")) this.close(); return false;}.bindAsEventListener(this) });
      }
    }
  },
  refresh: function ()
  {
    this.refreshMonthYear();
    this.refreshCalendarGrid();
    
    this.setSelectedClass();
    this.updateFooter();
  },
  refreshCalendarGrid: function () {
    this.beginning_date = new Date(this.date).stripTime();
    this.beginning_date.setDate(1);
    this.beginning_date.setHours(12); // Prevent daylight savings time boundaries from showing a duplicate day
    var pre_days = this.beginning_date.getDay() // draw some days before the fact
    if (pre_days < 3) pre_days += 7;
    this.beginning_date.setDate(1 - pre_days + Date.first_day_of_week);
    
    var iterator = new Date(this.beginning_date);
    
    var today = new Date().stripTime();
    var this_month = this.date.getMonth();
    vdc = this.options.get("valid_date_check");
    for (var cell_index = 0;cell_index<42; cell_index++)
    {
      day = iterator.getDate(); month = iterator.getMonth();
      cell = this.calendar_day_grid[cell_index];
      Element.remove(cell.childNodes[0]); div = cell.build("div", {innerHTML:day});
      if (month!=this_month) div.className = "other";
      cell.day = day; cell.month = month; cell.year = iterator.getFullYear();
      if (vdc) { if (vdc(iterator.stripTime())) cell.removeClassName("disabled"); else cell.addClassName("disabled") };
      iterator.setDate( day + 1);
    }
    
    if (this.today_cell) this.today_cell.removeClassName("today");
    
    if ( $R( 0, 41 ).include(days_until = this.beginning_date.stripTime().daysDistance(today)) ) {
      this.today_cell = this.calendar_day_grid[days_until];
      this.today_cell.addClassName("today");
    }
  },
  refreshMonthYear: function() {
    var m = this.date.getMonth();
    var y = this.date.getFullYear();
    // set the month
    if (this.options.get("month_year") == "dropdowns") 
    {
      this.month_select.setValue(m, false);
      
      var e = this.year_select.element; 
      if (this.flexibleYearRange() && (!(this.year_select.setValue(y, false)) || e.selectedIndex <= 1 || e.selectedIndex >= e.options.length - 2 )) this.populateYearRange();
      
      this.year_select.setValue(y);
      
    } else {
      this.month_year_label.update( Date.months[m] + " " + y.toString()  );
    }
  },
  populateYearRange: function() {
    this.year_select.populate(this.yearRange().toArray());
  },
  yearRange: function() {
    if (!this.flexibleYearRange())
      return $R(this.options.get("year_range")[0], this.options.get("year_range")[1]);
      
    var y = this.date.getFullYear();
    return $R(y - this.options.get("year_range"), y + this.options.get("year_range"));
  },
  flexibleYearRange: function() { return (typeof(this.options.get("year_range")) == "number"); },
  validYear: function(year) { if (this.flexibleYearRange()) { return true;} else { return this.yearRange().include(year);}  },
  dayHover: function(element) {
    var hover_date = new Date(this.selected_date);
    hover_date.setYear(element.year); hover_date.setMonth(element.month); hover_date.setDate(element.day);
    this.updateFooter(hover_date.toFormattedString(this.use_time));
  },
  dayHoverOut: function(element) { this.updateFooter(); },
  clearSelectedClass: function() {if (this.selected_cell) this.selected_cell.removeClassName("selected");},
  setSelectedClass: function() {
    if (!this.selection_made) {	return;	}
    this.clearSelectedClass()
    if ($R(0,42).include( days_until = this.beginning_date.stripTime().daysDistance(this.selected_date.stripTime()) )) {
      this.selected_cell = this.calendar_day_grid[days_until];
      this.selected_cell.addClassName("selected");
    }
  },
  reparse: function() { this.parseDate(); this.refresh(); },
  dateString: function() {
    return (this.selection_made) ? this.selected_date.toFormattedString(this.use_time) : "&#160;";
  },
  parseDate: function()
  {
    var value = $F(this.target_element).strip()
    this.selection_made = (value != "");
	/* modificado - mike */
    this.date = value=="" ? NaN : Date.parseFormattedString(this.setStandardDateFormat(this.options.get("date") || value));
	/* end modif - mike */
    if (isNaN(this.date)) this.date = new Date();
    if (!this.validYear(this.date.getFullYear())) this.date.setYear( (this.date.getFullYear() < this.yearRange().start) ? this.yearRange().start : this.yearRange().end);
    this.selected_date = new Date(this.date);
    this.use_time = /[0-9]:[0-9]{2}/.exec(value) ? true : false;
    this.date.setDate(1);
  },
  updateFooter:function(text) { if (!text) text = this.dateString(); this.footer_div.purgeChildren(); this.footer_div.build("span", {innerHTML: text }); },
  clearDate:function() {
    if ((this.target_element.disabled || this.target_element.readOnly) && this.options.get("popup") != "force") return false;
    var last_value = this.target_element.value;
    this.target_element.value = "";
    this.clearSelectedClass();
    this.updateFooter('&#160;');
    if (last_value!=this.target_element.value) this.callback("onchange");
  },
  updateSelectedDate:function(partsOrElement, via_click) {
    var parts = $H(partsOrElement);
    if ((this.target_element.disabled || this.target_element.readOnly) && this.options.get("popup") != "force") return false;
    if (parts.get("day")) {
      var t_selected_date = this.selected_date, vdc = this.options.get("valid_date_check");
      for (var x = 0; x<=3; x++) t_selected_date.setDate(parts.get("day"));
      t_selected_date.setYear(parts.get("year"));
      t_selected_date.setMonth(parts.get("month"));
      
      if (vdc && ! vdc(t_selected_date.stripTime())) { return false; }
      this.selected_date = t_selected_date;
      this.selection_made = true;
    }
    
    if (!isNaN(parts.get("hour"))) this.selected_date.setHours(parts.get("hour"));
    if (!isNaN(parts.get("minute"))) this.selected_date.setMinutes( Math.floor_to_interval(parts.get("minute"), this.options.get("minute_interval")) );
    if (parts.get("hour") === "" || parts.get("minute") === "") 
      this.setUseTime(false);
    else if (!isNaN(parts.get("hour")) || !isNaN(parts.get("minute")))
      this.setUseTime(true);
    
    this.updateFooter();
    this.setSelectedClass();
    
    if (this.selection_made) this.updateValue();
    if (this.closeOnClick()) { this.close(); }
    if (via_click && !this.options.get("embedded")) {
      if ((new Date() - this.last_click_at) < 333) this.close();
      this.last_click_at = new Date();
    }
  },
  closeOnClick: function() {
    if (this.options.get("embedded")) return false;
    if (this.options.get("close_on_click")===nil )
      return (this.options.get("time")) ? false : true
    else
      return (this.options.get("close_on_click"))
  },
  navMonth: function(month) { (target_date = new Date(this.date)).setMonth(month); return (this.navTo(target_date)); },
  navYear: function(year) { (target_date = new Date(this.date)).setYear(year); return (this.navTo(target_date)); },
  navTo: function(date) {
    if (!this.validYear(date.getFullYear())) return false;
    this.date = date;
    this.date.setDate(1);
    this.refresh();
    this.callback("after_navigate", this.date);
    return true;
  },
  setUseTime: function(turn_on) {
    this.use_time = this.options.get("time") && (this.options.get("time")=="mixed" ? turn_on : true) // force use_time to true if time==true && time!="mixed"
    if (this.use_time && this.selected_date) { // only set hour/minute if a date is already selected
      var minute = Math.floor_to_interval(this.selected_date.getMinutes(), this.options.get("minute_interval"));
      var hour = this.selected_date.getHours();
      
      this.hour_select.setValue(hour);
      this.minute_select.setValue(minute)
    } else if (this.options.get("time")=="mixed") {
      this.hour_select.setValue(""); this.minute_select.setValue("");
    }
  },
  updateValue: function() {
    var last_value = this.target_element.value;
    this.target_element.value = this.dateString();
    if (last_value!=this.target_element.value) this.callback("onchange");
  },
  today: function(now) {
    var d = new Date(); this.date = new Date();
    var o = $H({ day: d.getDate(), month: d.getMonth(), year: d.getFullYear(), hour: d.getHours(), minute: d.getMinutes()});
    if ( ! now ) o = o.merge({hour: "", minute:""}); 
    this.updateSelectedDate(o, true);
    this.refresh();
  },
  close: function() {
    if (this.closed) return false;
    this.callback("before_close");
    this.target_element.calendar_date_select = nil;
    Event.stopObserving(document, "mousedown", this.closeIfClickedOut_handler);
    Event.stopObserving(document, "keypress", this.keyPress_handler);
    this.calendar_div.remove(); this.closed = true;
    if (this.iframe) this.iframe.remove();
    if (this.target_element.type != "hidden" && ! this.target_element.disabled) this.target_element.focus();
    this.callback("after_close");
  },
  closeIfClickedOut: function(e) {
    if (! $(Event.element(e)).descendantOf(this.calendar_div) ) this.close();
  },
  keyPress: function(e) {
    if (e.keyCode==Event.KEY_ESC) this.close();
  },
  callback: function(name, param) { if (this.options.get(name)) { this.options.get(name).bind(this.target_element)(param); } },
  
  /* Front - Mike - agregado para limitar fechas a escoger */
 setValidDateCheck: function(foo) {
 	this.options.set("valid_date_check", foo);
	this.refreshCalendarGrid();
 },
 /* Front - Mike - convertir formato dd/mm/YYYY a mm/dd/YYYY para que lo entienda la libreria */ 
 setStandardDateFormat: function(date) {
 	var v = date.split("-");
 	day = v[1];
 	month = v[0];
 	year = v[2];
	if(day.toString().substring(0,1)=="0") day = day.toString().substring(1);
	if(month.toString().substring(0,1)=="0") month = month.toString().substring(1);
 	var formatted = day + "-" + month + "-" + year;
	return formatted;
 }
}

// ------------------------------------------------------------
// Traduccion al espanol de este plugin calendario (Front - Mike - 16/04/09)

Date.weekdays = $w("L Ma Mi J V S D");
Date.first_day_of_week = 1;
Date.months = $w("Enero Febrero Marzo Abril Mayo Junio Julio Agosto Septiembre Octubre Noviembre Diciembre" );
_translations = {
  "OK": "OK",
  "Now": "Ahora",
  "Today": "Hoy",
  "Clear": "Limpiar"
}

// Formats date and time as "01 January 2000 17:00"
Date.prototype.toFormattedString = function(include_time)
{
   str = Date.padded2(this.getDate()) + "-" + Date.padded2(this.getMonth()+1) + "-" + this.getFullYear();
   if (include_time) { str += " " + this.getHours() + ":" + this.getPaddedMinutes() }
   return str;
}

// ------------------------------------------------------------
// buscar campos donde se tiene que aplicar calendario (Front - Mike - 25/03/09)
Event.observe(window,'load',function(){
	$$('.calendar-date').each(function(item){
		Event.observe(item,'click',function(){
			new CalendarDateSelect($(item));
		});
		Event.observe(item,'keydown',function(){
			new CalendarDateSelect($(item));
		});
	});
});/**
 * carousel.js - Common
 * =========================================
 * @revision: 	1.1		
 * @modified: 	Ignacio	(15-06-11)
 */

/*
Copyright (c) 2009 Victor Stanciu - http://www.victorstanciu.ro

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
*/

Carousel = Class.create(Abstract, {
	initialize: function (scroller, slides, controls, options) {
		this.scrolling	= false;
		this.scroller	= $(scroller);
		this.slides		= slides;
		this.controls	= controls;

		this.options    = Object.extend({
            duration:           1,
            auto:               false,
            frequency:          3,
            visibleSlides:      1,
            controlClassName:   'carousel-control',
            jumperClassName:    'carousel-jumper',
            disabledClassName:  'carousel-disabled',
            selectedClassName:  'carousel-selected',
            circular:           false,
            wheel:              true,
            effect:             'scroll',
            transition:         'sinoidal',
            controlEvent:		'click',	// what event triggers the slide changes
            controlTag:			'a',		// what tag is used by the controls
            blockControls: 		true, 		// whether to block controls while switching slides
            selectControlParent: false 		// whether the controls parent should be selected instead of the control itself
        }, options || {});
        
        if (this.options.effect == 'fade') {
            this.options.circular = true;
        }

		this.slides.each(function(slide, index) {
			slide._index = index;
        });

		if (this.controls) {
            this.controls.invoke('observe', this.options.controlEvent, this.click.bind(this));
        }
        
        if (this.options.wheel) {            
            this.scroller.observe('mousewheel', this.wheel.bindAsEventListener(this)).observe('DOMMouseScroll', this.wheel.bindAsEventListener(this));;
        }

        if (this.options.auto) {
            this.start();
        }

		if (this.options.initial) {
			var initialIndex = this.slides.indexOf($(this.options.initial));
			if (initialIndex > (this.options.visibleSlides - 1) && this.options.visibleSlides > 1) {               
				if (initialIndex > this.slides.length - (this.options.visibleSlides + 1)) {
					initialIndex = this.slides.length - this.options.visibleSlides;
				}
			}
			if(this.slides[initialIndex] !== undefined){
	            this.moveTo(this.slides[initialIndex]);
			}
		}
		
		if (this.hasNext()) {
			this.enableNext();
		} else {
			this.disableNext();
		}
		if (this.hasPrev()) {
			this.enablePrev();
		} else {
			this.disablePrev();
		}
	},

	click: function (event) {
		this.stop();

		var element = event.findElement(this.options.controlTag);

		if (!this.options.blockControls || !element.hasClassName(this.options.disabledClassName)) {
			var target = element.rel;
			if (!target) { // search in children for an a element
				var child = Element.down(element, 'a');
				if (child) target = child.rel;
			}
			if (element.hasClassName(this.options.controlClassName)) {
				eval("this." + target + "()");
            } else if (element.hasClassName(this.options.jumperClassName)) {
                this.moveTo(target);
                if (this.options.selectedClassName) {
                	if (this.options.selectControlParent) {
                		var scn = this.options.selectedClassName;
                		this.controls.each(function(c) {
                			c.up().removeClassName(scn);
                		});
                		element.up().addClassName(scn);
                	} else {
                    	this.controls.invoke('removeClassName', this.options.selectedClassName);
                    	element.addClassName(this.options.selectedClassName);
                	}
            	}
        	}
        }

		this.deactivateControls();

		event.stop();
    },

	moveTo: function (element) {
		if (this.options.beforeMove && (typeof this.options.beforeMove == 'function')) {
			this.options.beforeMove();
        }

		this.previous = this.current ? this.current : this.slides[0];
		this.current  = $(element);

		if (this.hasNext()) {
			this.enableNext();
		} else {
			this.disableNext();
		}
		if (this.hasPrev()) {
			this.enablePrev();
		} else {
			this.disablePrev();
		}
		
		var scrollerOffset = this.scroller.cumulativeOffset();
		var elementOffset  = this.current.cumulativeOffset();

		if (this.scrolling) {
			this.scrolling.cancel();
		}

		// how much needs to be scrolled
		var dx = elementOffset[0] - scrollerOffset[0];
        var dy = elementOffset[1] - scrollerOffset[1];
		
        switch (this.options.effect) {
            case 'fade':               
                this.scrolling = new Effect.Opacity(this.scroller, {
                    from:   1.0,
                    to:     0,
                    duration: this.options.duration,
                    afterFinish: (function () {
                        this.scroller.scrollLeft = dx;
                        this.scroller.scrollTop  = dy;

                        new Effect.Opacity(this.scroller, {
                            from: 0,
                            to: 1.0,
                            duration: this.options.duration,
                            afterFinish: (function () {
                                if (this.controls) {
                                    this.activateControls();
                                }
                                if (this.options.afterMove && (typeof this.options.afterMove == 'function')) {
                                    this.options.afterMove();
                                }
                            }).bind(this)
                        });
                    }
                ).bind(this)});
            break;
            case 'scroll':
            default:
                var transition;
                switch (this.options.transition) {
                    case 'spring':
                        transition = Effect.Transitions.spring;
                        break;
                    case 'sinoidal':
                    default:
                        transition = Effect.Transitions.sinoidal;
                        break;
                }
                this.scrolling = new Effect.SmoothScroll(this.scroller, {
                	// si lo que hay que scrollear es 0, que la duración del efecto sea 0
                    duration: (dx == this.scroller.scrollLeft && dy == this.scroller.scrollTop) ? 0 : this.options.duration,
                    x: dx,
                    y: dy,
                    transition: transition,
                    afterFinish: (function () {
                        if (this.controls) {
                            this.activateControls();
                        }
                        if (this.options.afterMove && (typeof this.options.afterMove == 'function')) {
                            this.options.afterMove();
                        }                        
                        this.scrolling = false;
                    }).bind(this)});
            break;
        }

		return false;
	},

	prev: function () {
		if (this.current) {
			var currentIndex = this.current._index;
			var prevIndex = (currentIndex == 0) ? (this.options.circular ? this.slides.length - 1 : 0) : currentIndex - 1;
        } else {
            var prevIndex = (this.options.circular ? this.slides.length - 1 : 0);
        }

		if (prevIndex == (this.slides.length - 1) && this.options.circular && this.options.effect != 'fade') {
			this.scroller.scrollLeft =  (this.slides.length - 1) * this.slides.first().getWidth();
			this.scroller.scrollTop =  (this.slides.length - 1) * this.slides.first().getHeight();
			prevIndex = this.slides.length - 2;
        }
		if (this.slides[prevIndex] !== undefined) {
			this.moveTo(this.slides[prevIndex]);
		} else if (typeof this.options.afterMove == 'function') {
            this.options.afterMove(); // si no hace falta mover, directamente llamar al afterMove
		}
	},

	next: function () {
		if (this.current) {
			var currentIndex = this.current._index;
			var nextIndex = (this.slides.length - 1 == currentIndex) ? (this.options.circular ? 0 : currentIndex) : currentIndex + 1;
        } else {
            var nextIndex = 1;
			
        }

		if (nextIndex == 0 && this.options.circular && this.options.effect != 'fade') {
			this.scroller.scrollLeft = 0;
			this.scroller.scrollTop  = 0;
			nextIndex = 1;
        }

		if (nextIndex > this.slides.length - (this.options.visibleSlides + 1)) {
			nextIndex = this.slides.length - this.options.visibleSlides;
		}		
		if(this.slides[nextIndex]!== undefined){
			this.moveTo(this.slides[nextIndex]);
		} else if (typeof this.options.afterMove == 'function') {
            this.options.afterMove(); // si no hace falta mover, directamente llamar al afterMove
		}
	},
	
	hasPrev: function() {
		return this.options.circular || this.current && this.current._index > 0;
	},
	
	hasNext: function() {
		return this.options.circular || (this.slides.length - this.options.visibleSlides - (this.current ? this.current._index : 0) > 0);
	},
	
	disablePrev: function() {
		var as = $$('a.' + this.options.controlClassName + '[rel=prev]');
		if (as.length) {
			as[0].addClassName('carousel-limit');
		}
	},
	
	disableNext: function() {
		var as = $$('a.' + this.options.controlClassName + '[rel=next]');
		if (as.length) {
			as[0].addClassName('carousel-limit');
		}
	},
	
	enablePrev: function() {
		var as = $$('a.' + this.options.controlClassName + '[rel=prev]');
		if (as.length) {
			as[0].removeClassName('carousel-limit');
		}
	},
	
	enableNext: function() {
		var as = $$('a.' + this.options.controlClassName + '[rel=next]');
		if (as.length) {
			as[0].removeClassName('carousel-limit');
		}
	},

	first: function () {
		this.moveTo(this.slides[0]);
    },

	last: function () {
		this.moveTo(this.slides[this.slides.length - 1]);
    },

	toggle: function () {
		if (this.previous) {
			this.moveTo(this.slides[this.previous._index]);
        } else {
            return false;
        }
    },

	stop: function () {
		if (this.timer) {
			clearTimeout(this.timer);
		}
	},

	start: function () { 
        this.periodicallyUpdate();
    },

	pause: function () {
		this.stop();
		this.activateControls();
    },

	resume: function (event) {
		if (event) {
			var related = event.relatedTarget || event.toElement;
			if (!related || (!this.slides.include(related) && !this.slides.any(function (slide) { return related.descendantOf(slide); }))) {
				this.start();
            }
        } else {
            this.start();
        }
    },

	periodicallyUpdate: function () {
		if (this.timer != null) {
			clearTimeout(this.timer);
			this.next();
        }
		this.timer = setTimeout(this.periodicallyUpdate.bind(this), this.options.frequency * 1000);
    },
    
    wheel: function (event) {
        event.cancelBubble = true;
        event.stop();
        
		var delta = 0;
		if (!event) {
            event = window.event;
        }
		if (event.wheelDelta) {
			delta = event.wheelDelta / 120; 
		} else if (event.detail) { 
            delta = -event.detail / 3;	
        }        
       
        if (!this.scrolling) {
            this.deactivateControls();
            if (delta > 0) {
                this.prev();
            } else {
                this.next();
            }            
        }
        
		return Math.round(delta); //Safari Round
    },

	deactivateControls: function () {
		this.controls.invoke('addClassName', this.options.disabledClassName);
    },

	activateControls: function () {
		this.controls.invoke('removeClassName', this.options.disabledClassName);
    }
});


Effect.SmoothScroll = Class.create();
Object.extend(Object.extend(Effect.SmoothScroll.prototype, Effect.Base.prototype), {
	initialize: function (element) {
		this.element = $(element);
		var options = Object.extend({ x: 0, y: 0, mode: 'absolute' } , arguments[1] || {});
		this.start(options);
    },

	setup: function () {
		if (this.options.continuous && !this.element._ext) {
			this.element.cleanWhitespace();
			this.element._ext = true;
			this.element.appendChild(this.element.firstChild);
        }

		this.originalLeft = this.element.scrollLeft;
		this.originalTop  = this.element.scrollTop;

		if (this.options.mode == 'absolute') {
			this.options.x -= this.originalLeft;
			this.options.y -= this.originalTop;
        }
    },

	update: function (position) {
		this.element.scrollLeft = this.options.x * position + this.originalLeft;
		this.element.scrollTop  = this.options.y * position + this.originalTop;
    }
});/**
 * "Clase" para administrar cookies.
 * @revision: 	1.0
 * @modified: 	Ignacio (15-06-2011)
 */
var Cookies = {
	
	/**
	 * Establece el valor de una cookie.
	 * @param {String} name - Nombre de la cookie
	 * @param {String} value - Valor de la cookie
	 * @param {int} days - Cuántos días antes de que expire (default: 0, expira cuando se cierra el navegador)
	 * @param {String} path - Ruta donde se guarda la cookie (default: "", ruta actual)
	 * @param {String} domain - Dominio para el que se guarda la cookie (default: "", dominio actual)
	 */
	set: function(name, value, days, path, domain) {
		var options = "";
		if (days) {
			var date = new Date();
			date.setTime(date.getTime() + (days*24*60*60*1000));
			options += "; expires=" + date.toUTCString()
		}
		if (path) {
			options += "; path=" + path;
		}
		if (domain) {
			options += "; domain=" + domain;
		}
		document.cookie = escape(name) + "=" + escape(value) + options;
	},
	
	/**
	 * Devuelve el valor de una cookie.
	 * @param {String} name - Nombre de la cookie
	 * @return {String} Valor de la cookie, o string vacío si no existe.
	 */
	get: function(name) {
		var cookies = document.cookie.split(';');
	   	for (var i=0; i < cookies.length; i++) {
	   		var parts = cookies[i].split('=');
	   		if (unescape(parts[0]).replace(/^\s*|\s*$/g, "") == name) {
	   			return unescape(parts[1]);
	   		}
	   	}
	   	return "";
	},
	
	/**
	 * Borra una cookie.
	 * @param {String} name - Nombre de la cookie.
	 * @param {String} path - Ruta de donde borrarlo (default: "", la ruta actual)
	 * @param {String} domain - Dominio de donde borrarlo (default: "", dominio actual)
	 */
	unset: function(name, path, domain) {
		Cookies.set(name, "", -1, path, domain);
	}
};
/**
 *  ga.js
 * =========================================
 * @requieres: 	--
 * @revision: 	1.0
 */

/**
 * GoogleAnalytics - Common
 * =========================================
 * @modified: 	Marcos (30-06-11)
 */
var GoogleAnalytics = new Class.create({
    initialize: function() {
    	this.bDebug =			true;
    },
    
	/**
	 * Registra eventos en Google Analytics 
	 * a partir de los datos y el evento suministrados
	 * @param {Object} sEvent
	 * @param {Object} oOptions
	 */
    registerEvent: function (sEvent, oOptions) {
    	switch(sEvent) {
			// agregar un producto desde listado de producto
			case 'addToCartProductList':
				var sPkCampaign = PRV.Url.getUrlParamValue('campaign').toString(),
				sPkProduct = oOptions.pkProduct.toString();

				_gaq.push(
						['_trackEvent', 'ecomm>addToCart', sPkCampaign, sPkProduct],
						['_trackEvent', 'ecomm>addToCartList', sPkCampaign, sPkProduct]
						);
				break;
			// agregar un producto desde detalle de producto
			case 'addToCartProductPage':
				var sPkCampaign = PRV.Url.getUrlParamValue('campaign').toString(),
				sPkProduct = oOptions.pkProduct.toString();
				_gaq.push(
						['_trackEvent', 'ecomm>addToCart', sPkCampaign, sPkProduct],
						['_trackEvent', 'ecomm>addToCartPage', sPkCampaign, sPkProduct]
						);
				break;
			// agregar un producto desde tooltip de producto recomendado
			case 'addToCartTooltipRC':
				var sPkCampaign = PRV.Url.getUrlParamValue('campaign').toString(),
				sPkProduct = oOptions.pkProduct.toString();

				_gaq.push(
						['_trackEvent', 'ecomm>addToCart', sPkCampaign, sPkProduct],
						['_trackEvent', 'ecomm>addToCartRecommendedTooltip', sPkCampaign, sPkProduct]
						);
				break;
			// agregar un producto desde tooltip de la misma talla
			case 'addToCartTooltipSC':
				var sPkCampaign = PRV.Url.getUrlParamValue('campaign').toString(),
				sPkProduct = oOptions.pkProduct.toString();

				_gaq.push(
						['_trackEvent', 'ecomm>addToCart', sPkCampaign, sPkProduct],
						['_trackEvent', 'ecomm>addToCartSizeTooltip', sPkCampaign, sPkProduct]
						);
				break;
			// agregar un producto desde tooltip de producto de la familia
			case 'addToCartTooltipFC':
				var sPkCampaign = PRV.Url.getUrlParamValue('campaign').toString(),
				sPkProduct = oOptions.pkProduct.toString();

				_gaq.push(
						['_trackEvent', 'ecomm>addToCart', sPkCampaign, sPkProduct],
						['_trackEvent', 'ecomm>addToCartFamilyTooltip', sPkCampaign, sPkProduct]
						);
				break;
			// ver un producto desde tooltip de producto
			case 'viewProductTooltip':
				if (oOptions.type == 'FC') {
					// producto de la familia
					var sPkCampaign = PRV.Url.getUrlParamValue('campaign').toString(),
					sPkProduct = oOptions.pkProduct.toString();
					_gaq.push(
							['_trackEvent', 'ecomm>viewProductFamilyTooltip', sPkCampaign, sPkProduct]
							);
				} else if (oOptions.type == 'SC') {
					// producto de la misma talla
					var sPkCampaign = PRV.Url.getUrlParamValue('campaign').toString(),
					sPkProduct = oOptions.pkProduct.toString();
					_gaq.push(
							['_trackEvent', 'ecomm>viewProductSizeTooltip', sPkCampaign, sPkProduct]
							);
				} else {
					// product recomendado
					var sPkCampaign = PRV.Url.getUrlParamValue('campaign').toString(),
					sPkProduct = oOptions.pkProduct.toString();
					_gaq.push(
							['_trackEvent', 'ecomm>viewProductRecommendedTooltip', sPkCampaign, sPkProduct]
							);
				}
				break;
			case 'clickChat':
				_gaq.push(['_trackEvent', 'chat', 'click']);
				break;
			case 'ErrorJS':
				_gaq.push(['_trackEvent', 'ErrorJS', 'error', oOptions.errorName]);
				break;
			case 'FormError':
				var sErrors = oOptions.fieldErrors,
				sForm = oOptions.form;
				_gaq.push(['_trackEvent', 'Form/' + sForm , 'error', sErrors ]);
				break;
    	}
    },
	
	/**
	 * Envia a Google Analytics los arrays de datos pasados como parametro
	 * @param {Object} oVars - contiene los arrays de datos a enviar
	 */
	registerView: function (oVars){
		var nLen = oVars.length;
		for (var i = 0; i < nLen; i++){
			_gaq.push(oVars[i]);
		}
	}
	
});

PRV.Tracker.Ga = new GoogleAnalytics();/**
 * global.js - Common
 * =========================================
 * @revision: 	2.1
 * @modified: 	Ruben	(09-05-11)
 */

/**
 * Cuando se aceptan las condiciones del servicio
 * Cerramos la modal y marcamos el checkbox de condiciones de uso
 * @param {Object} modal - modal de condiciones de servicio
 */
function acceptServiceConditions(data, modal, idCheckbox){
	var S = new PrivaliaSellingServices();
	S.acceptConditions(data, modal, idCheckbox);
}

/**
 * Invoca el metodo de anyadir al carrito del objeto Data
 * (en principio dentro de detalle de producto, extensible siempre y cuando
 * se llame igual en listado de productos
 */
function addToCart(form) {
	Data.addToCart(form);
}

/**
 * Cuando no se aceptan las condiciones del servicio
 * Vaciamos la cesta y redigirimos
 * @param {Object} data - objeto getSummaryData
 * @param {Object} idForm - formulario de la modal
 */
function dontAcceptServiceConditions(data, idForm){
	var S = new PrivaliaSellingServices();
	//Vaciamos el carrito y una vez completada la operacion, redireccionamos segun la url que recibimos
	data.submitEmptyCart(idForm, function(){
		var url_redirect = S.getRedirectionUrl(data.getResData());
		document.location.href = url_redirect;
	});
	}

/**
 * Obtiene el valor del Adv Checkbox
 */
function getAdvertisingValue() {
	return MH.res_data.header_page_data.member_advertising;
}

/**
 * Obtiene el nombre de la campanya y el id del pedido reabierto
 */
function getReopenCampaingPK () {
	var campaingCart = MH.getReopenedCampaignPK();
	$('campaignPK_reopen').update(campaingCart);

	var campaingNameCart = MH.getReopenedCampaignName();
	$('campaignPK_name').update(campaingNameCart);
}

/**
 * Actualiza la cesta de compra en la cabecera
 */
function reloadCart() {
	MH.reload();
}

/**
 * Actualiza la pagina de compra en un click
 */
function reloadSummary() {
	Data.reload();
}

/**
 * Comprueba si se puede reabrir algun pedido de la misma campanya
 * Si es asi, muestra la lista de pedidos a reabrir, sino, continua con el addToCart habitual
 */
function selectProduct(mdlOrdersReopen, mdlReopenOther, form) {
	// Boton de anyadir a producto esta habilitado
	if(Data.btnAddToCartIsEnabled(form)) {
		if(Country.reopenOrderEnabled()) {
			// Comprueba si es un producto que se puede reabrir un pedido
			if(!Object.isUndefined(Reopen)) {
				if(MH.getCartLoaded()) {
					Reopen.addToCart(MH.getNumItems(), mdlOrdersReopen, mdlReopenOther, form);
				}
				else {
					// todavia no ha cargado los datos de la cesta (menuheader),
					// necesitamos esos datos para saber si esta reabriendo o no.
					MH.loadText('Still loading your cart...');
				}
			}
		}else {
			addToCart(form);
		}
	}

	return false;
}

/**
 * Cargamos los Carousels de productos relacionados en el Detalle de producto
 */
function setFittingRoomASide(){
	//RelatedProducts - Te gustara
	var Data2 = new PrivaliaMicrositesFittingroom();
	Data2.setCssJson('json2');
	var urlGetDataRelated = Data2.getUrlGetData('related-products');
 	Data2.getData(urlGetDataRelated,'relatedcarousel');
}

/**
 * Cargamos los Carousels de productos relacionados en el Detalle de producto
 */
function setFittingRoomServiceASide(){
	//FamilyProducts - Esto queda genial con
	var Data4 = new PrivaliaMicrositesFittingroom();
	Data4.setCssJson('json4');
	var urlGetDataFamily = Data4.getUrlGetData('family-products');
 	Data4.getData(urlGetDataFamily,'familycarousel');
}

/**
 * Gestiona elemento relacionado con reabrir pedido a la hora de cancelar pedido
 * @param {Object} sizeChangeModal - modal de cambiar talla, para su posterior utilizacion
 */
function submitCancel (sizeChangeModal) {
	if(($('reason3')!== null) && ($('reason3').checked)){
		 Reopen.submitReopenOrderFromCancel($F('order'), modalReopenOrder, modalOtherReopened);
}
	else {
		Data.submitCancelCart('cancelCart',sizeChangeModal);
}
}

/**
 * Configuraciones
 * --------------------------------------------
 */

var CFG_MODAL = {
	overlayOpacity: 0.75,
	className: 'modal',
	fade: true,
	fadeDuration: 0.60
};

var CFG_MODAL_WHITE = {
	overlayOpacity: 0.75,
	className: 'modal-white',
	fade: true,
	fadeDuration: 0.60
};

var CFG_NO_AVOIDABLE_MODAL = {
	overlayOpacity: 0.75,
	className: 'modal',
	fade: true,
	fadeDuration: 0.60,
	closeOnClick: false
};

var CFG_NO_AVOIDABLE_MODAL_WHITE = {
		overlayOpacity: 0.75,
		className: 'modal-white',
		fade: true,
		fadeDuration: 0.60,
		closeOnClick: false
	};
/**
 * Plantillas
 * --------------------------------------------
 */

var TPL_MENU_OPTION = 	'<li><a href="#{wcategory_url}" class="#{css_status} omni omni_event62" id="#{prefix}category_#{wcategory_PK}" onclick="Filter.select(this,#{wcategory_PK});return Data.updateCategory(#{wcategory_PK});"><span>#{wcategory_name}</span></a></li>';
var TPL_SELECT = 		'<option value="#{value}" #{selected} class="#{css}" id="#{id}" #{disabled}>#{label}</option>';
var TPL_PAGINATION = 	'<li><a href="javascript:;" class="#{css}" onclick="">#{page}</a></li>';
var TPL_CATEGORY_TITLE ='<h2 class="categories left"><span class="category">#{category} </span><span class="subcategory">#{subcategory}</span></h2>';
var TPL_SIZE_FILTER = 	"<li class=\"#{css}\"><a href=\"javascript:;\" id=\"#{s_sizeId}\" class=\"size-selector\" onclick=\"Filter.sizeSelectDrop('#{s_sizeId}');return Data.sizeSelectionHide('#{s_sizeString}', '#{s_sizeId}');\"><span>#{s_sizeString}</span></a></li>";

var TPL_CATMENU 			= '<li class="listCategoryNavigation #{last} #{css_status}"><h4 class="listCategoryLabel"><a href="#{wcategory_url}" class="omni omni_event62 js-catPK_#{wcategory_PK}" id="#{id}_category_#{wcategory_PK}" onclick="Filter.selectInMenu(#{wcategory_PK},#{wcategory_PK});return Data.updateCategory(#{wcategory_PK});" title="#{wcategory_name}">#{wcategory_name}</a></h4><ul>#{submenu}</ul></li><div class="#{clearing}"></div>';
var TPL_SUBMENU 			= '<li><a href="#{wcategory_url}" class="omni omni_event62 js-catPK_#{wcategory_PK} #{css_all}" id="#{id}_subcategory_#{wcategory_PK}" onclick="Filter.selectInMenu(#{wcategory_PK},#{wcategory_parent_PK});return Data.updateCategory(#{wcategory_PK});" title="#{wcategory_name}"><span>#{wcategory_name}</span></a></li>';

//Home de campanya
var TPL_HOMECAT_MENU_OPTION =    	'<li class="#{firstCategory}"><h4 class="listCategoryLabel"><a href="javascript:;" title="#{wcategory_url}" class="#{css_status} jsonMenu_link" >#{wcategory_name}</a></h4><ul style="#{showsubmenu}">#{submenu}</ul></li>';
var TPL_HOMECAT_SUBMENU =		 	'<li class="#{css}"><a href="javascript:;" title="#{wcategory_url}" class="#{css_status} jsonMenu_link" ><span>#{wcategory_name}</span></a></li>';

//var TPL_BREAD_FIRSTSECTION = '<li><a href="javascript:;" title="#{title}" class="jsonBread_link">#{name}</a> > </li>';//Define la primera seccion fija del breadcrumb. Actualmente no hay ninguna.
var TPL_BREAD_FIRSTSECTION = '';
var TPL_BREAD_SECTION = '<li><a href="javascript:;" title="#{bread_url}" class="jsonBread_link #{bread_css}">#{bread_name}</a> > </li>';
var TPL_BREAD_LASTSECTION = '<li class="last truncateMe"> #{bread_name}</li>';

var TPL_NOTICE =		'<div class="#{cssbox}"><p>#{notice}</p><div class="ico-close"></div></div>';

//Proximamente en escaparate
var TPL_INCOMING_CAMPAIGN 	= '<li id="campaign-#{campaign_number}" class="campaign">#{campaign_name}</li>';
var TPL_FANSHOP_CAMPAIGN 	= '<li id="campaign-#{campaign_number}" class="fanshop-campaign"><span class="fan-shop-link">#{fanshop_copy}:</span> <a title="#{campaign_name}" target="_blank" href="#{url}">#{campaign_name}</a></li>';
var TPL_INCOMING_HOUR 		= '<dl><dt><time class="time">#{at_copy} #{hour}</time></dt><dd><ul class="brand-names">#{element_list}</ul></dd></dl>';
//Contadores escaparate
var TPL_CAMPAIGN_TIMER 		= '<time id="campaign-timer-#{campaign_counter}" class="campaign-timer"></time>';// For discussion and comments, see: http://remysharp.com/2009/01/07/html5-enabling-script/ (credit to @jdalton for minif)
/*@cc_on'abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video'.replace(/\w+/g,function(n){document.createElement(n)})@*//**
 * @author Ryan Johnson <http://saucytiger.com/>
 * @copyright 2008 PersonalGrid Corporation <http://personalgrid.com/>
 * @package LivePipe UI
 * @license MIT
 * @url http://livepipe.net/core
 * @require prototype.js
 */

if(typeof(Control) == 'undefined')
	Control = {};
	
var $proc = function(proc){
	return typeof(proc) == 'function' ? proc : function(){return proc};
};

var $value = function(value){
	return typeof(value) == 'function' ? value() : value;
};

Object.Event = {
	extend: function(object){
		object._objectEventSetup = function(event_name){
			this._observers = this._observers || {};
			this._observers[event_name] = this._observers[event_name] || [];
		};
		object.observe = function(event_name,observer){
			if(typeof(event_name) == 'string' && typeof(observer) != 'undefined'){
				this._objectEventSetup(event_name);
				if(!this._observers[event_name].include(observer))
					this._observers[event_name].push(observer);
			}else
				for(var e in event_name)
					this.observe(e,event_name[e]);
		};
		object.stopObserving = function(event_name,observer){
			this._objectEventSetup(event_name);
			if(event_name && observer)
				this._observers[event_name] = this._observers[event_name].without(observer);
			else if(event_name)
				this._observers[event_name] = [];
			else
				this._observers = {};
		};
		object.observeOnce = function(event_name,outer_observer){
			var inner_observer = function(){
				outer_observer.apply(this,arguments);
				this.stopObserving(event_name,inner_observer);
			}.bind(this);
			this._objectEventSetup(event_name);
			this._observers[event_name].push(inner_observer);
		};
		object.notify = function(event_name){
			this._objectEventSetup(event_name);
			var collected_return_values = [];
			var args = $A(arguments).slice(1);
			try{
				for(var i = 0; i < this._observers[event_name].length; ++i)
					collected_return_values.push(this._observers[event_name][i].apply(this._observers[event_name][i],args) || null);
			}catch(e){
				if(e == $break)
					return false;
				else
					throw e;
			}
			return collected_return_values;
		};
		if(object.prototype){
			object.prototype._objectEventSetup = object._objectEventSetup;
			object.prototype.observe = object.observe;
			object.prototype.stopObserving = object.stopObserving;
			object.prototype.observeOnce = object.observeOnce;
			object.prototype.notify = function(event_name){
				if(object.notify){
					var args = $A(arguments).slice(1);
					args.unshift(this);
					args.unshift(event_name);
					object.notify.apply(object,args);
				}
				this._objectEventSetup(event_name);
				var args = $A(arguments).slice(1);
				var collected_return_values = [];
				try{
					if(this.options && this.options[event_name] && typeof(this.options[event_name]) == 'function')
						collected_return_values.push(this.options[event_name].apply(this,args) || null);
					for(var i = 0; i < this._observers[event_name].length; ++i)
						collected_return_values.push(this._observers[event_name][i].apply(this._observers[event_name][i],args) || null);
				}catch(e){
					if(e == $break)
						return false;
					else
						throw e;
				}
				return collected_return_values;
			};
		}
	}
};

/* Begin Core Extensions */

//Element.observeOnce
Element.addMethods({
	observeOnce: function(element,event_name,outer_callback){
		var inner_callback = function(){
			outer_callback.apply(this,arguments);
			Element.stopObserving(element,event_name,inner_callback);
		};
		Element.observe(element,event_name,inner_callback);
	}
});

//mouseenter, mouseleave
//from http://dev.rubyonrails.org/attachment/ticket/8354/event_mouseenter_106rc1.patch
Object.extend(Event, (function() {
	var cache = Event.cache;

	function getEventID(element) {
		if (element._prototypeEventID) return element._prototypeEventID[0];
		arguments.callee.id = arguments.callee.id || 1;
		return element._prototypeEventID = [++arguments.callee.id];
	}

	function getDOMEventName(eventName) {
		if (eventName && eventName.include(':')) return "dataavailable";
		//begin extension
		if(!Prototype.Browser.IE){
			eventName = {
				mouseenter: 'mouseover',
				mouseleave: 'mouseout'
			}[eventName] || eventName;
		}
		//end extension
		return eventName;
	}

	function getCacheForID(id) {
		return cache[id] = cache[id] || { };
	}

	function getWrappersForEventName(id, eventName) {
		var c = getCacheForID(id);
		return c[eventName] = c[eventName] || [];
	}

	function createWrapper(element, eventName, handler) {
		var id = getEventID(element);
		var c = getWrappersForEventName(id, eventName);
		if (c.pluck("handler").include(handler)) return false;

		var wrapper = function(event) {
			if (!Event || !Event.extend ||
				(event.eventName && event.eventName != eventName))
					return false;

			Event.extend(event);
			handler.call(element, event);
		};
		
		//begin extension
		if(!(Prototype.Browser.IE) && ['mouseenter','mouseleave'].include(eventName)){
			wrapper = wrapper.wrap(function(proceed,event) {	
				var rel = event.relatedTarget;
				var cur = event.currentTarget;			 
				if(rel && rel.nodeType == Node.TEXT_NODE)
					rel = rel.parentNode;	  
				if(rel && rel != cur && !rel.descendantOf(cur))	  
					return proceed(event);   
			});	 
		}
		//end extension

		wrapper.handler = handler;
		c.push(wrapper);
		return wrapper;
	}

	function findWrapper(id, eventName, handler) {
		var c = getWrappersForEventName(id, eventName);
		return c.find(function(wrapper) { return wrapper.handler == handler });
	}

	function destroyWrapper(id, eventName, handler) {
		var c = getCacheForID(id);
		if (!c[eventName]) return false;
		c[eventName] = c[eventName].without(findWrapper(id, eventName, handler));
	}

	function destroyCache() {
		for (var id in cache)
			for (var eventName in cache[id])
				cache[id][eventName] = null;
	}

	if (window.attachEvent) {
		window.attachEvent("onunload", destroyCache);
	}

	return {
		observe: function(element, eventName, handler) {
			element = $(element);
			var name = getDOMEventName(eventName);

			var wrapper = createWrapper(element, eventName, handler);
			if (!wrapper) return element;

			if (element.addEventListener) {
				element.addEventListener(name, wrapper, false);
			} else {
				element.attachEvent("on" + name, wrapper);
			}

			return element;
		},

		stopObserving: function(element, eventName, handler) {
			element = $(element);
			var id = getEventID(element), name = getDOMEventName(eventName);

			if (!handler && eventName) {
				getWrappersForEventName(id, eventName).each(function(wrapper) {
					element.stopObserving(eventName, wrapper.handler);
				});
				return element;

			}else if (!eventName) {
				Object.keys(getCacheForID(id)).each(function(eventName) {
				// TODO: marcos - Peta en Explorer, comentamos de momento
					if(!Prototype.Browser.IE) {
						element.stopObserving(eventName);
					}
				});
				return element;
			}

			var wrapper = findWrapper(id, eventName, handler);
			if (!wrapper) return element;

			if (element.removeEventListener) {
				element.removeEventListener(name, wrapper, false);
			} else {
				element.detachEvent("on" + name, wrapper);
			}

			destroyWrapper(id, eventName, handler);

			return element;
		},

		fire: function(element, eventName, memo) {
			element = $(element);
			if (element == document && document.createEvent && !element.dispatchEvent)
				element = document.documentElement;

			var event;
			if (document.createEvent) {
				event = document.createEvent("HTMLEvents");
				event.initEvent("dataavailable", true, true);
			} else {
				event = document.createEventObject();
				event.eventType = "ondataavailable";
			}

			event.eventName = eventName;
			event.memo = memo || { };

			if (document.createEvent) {
				element.dispatchEvent(event);
			} else {
				element.fireEvent(event.eventType, event);
			}

			return Event.extend(event);
		}
	};
})());

Object.extend(Event, Event.Methods);

Element.addMethods({
	fire:			Event.fire,
	observe:		Event.observe,
	stopObserving:	Event.stopObserving
});

Object.extend(document, {
	fire:			Element.Methods.fire.methodize(),
	observe:		Element.Methods.observe.methodize(),
	stopObserving:	Element.Methods.stopObserving.methodize()
});

//mouse:wheel
(function(){
	function wheel(event){
		var delta;
		// normalize the delta
		if(event.wheelDelta) // IE & Opera
			delta = event.wheelDelta / 120;
		else if (event.detail) // W3C
			delta =- event.detail / 3;
		if(!delta)
			return;
		//var custom_event = event.element().fire('mouse:wheel',{
		var custom_event = Event.element(event).fire('mouse:wheel',{
			delta: delta
		});
		if(custom_event.stopped){
			event.stop();
			return false;
		}
	}
	document.observe('mousewheel',wheel);
	document.observe('DOMMouseScroll',wheel);
})();


/* End Core Extensions */

//from PrototypeUI
var IframeShim = Class.create({
	initialize: function() {
		this.element = new Element('iframe',{
			style: 'position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);display:none',
			src: 'javascript:void(0);',
			frameborder: 0 
		});
		$(document.body).insert(this.element);
	},
	hide: function() {
		this.element.hide();
		return this;
	},
	show: function() {
		this.element.show();
		return this;
	},
	positionUnder: function(element) {
		var element = $(element);
		var offset = element.cumulativeOffset();
		var dimensions = element.getDimensions();
		this.element.setStyle({
			left: offset[0] + 'px',
			top: offset[1] + 'px',
			width: dimensions.width + 'px',
			height: dimensions.height + 'px',
			zIndex: element.getStyle('zIndex') - 1
		}).show();
		return this;
	},
	setBounds: function(bounds) {
		for(prop in bounds)
			bounds[prop] += 'px';
		this.element.setStyle(bounds);
		return this;
	},
	destroy: function() {
		if(this.element)
			this.element.remove();
		return this;
	}
});/**
 * @author Ryan Johnson <http://saucytiger.com/>
 * @copyright 2008 PersonalGrid Corporation <http://personalgrid.com/>
 * @package LivePipe UI
 * @license MIT
 * @url http://livepipe.net/control/tabs
 * @require prototype.js, livepipe.js
 */

if(typeof(Prototype) == "undefined")
	throw "Control.Tabs requires Prototype to be loaded.";
if(typeof(Object.Event) == "undefined")
	throw "Control.Tabs requires Object.Event to be loaded.";

Control.Tabs = Class.create({
	initialize: function(tab_list_container,options){
		if(!$(tab_list_container))
			throw "Control.Tabs could not find the element: " + tab_list_container;
		this.activeContainer = false;
		this.activeLink = false;
		this.containers = $H({});
		this.links = [];
		Control.Tabs.instances.push(this);
		this.options = {
			beforeChange: Prototype.emptyFunction,
			afterChange: Prototype.emptyFunction,
			hover: false,
			linkSelector: 'li a',
			setClassOnContainer: false,
			activeClassName: 'active',
			defaultTab: 'first',
			autoLinkExternal: true,
			targetRegExp: /#(.+)$/,
			showFunction: Element.show,
			hideFunction: Element.hide
		};
		Object.extend(this.options,options || {});
		(typeof(this.options.linkSelector == 'string')
			? $(tab_list_container).select(this.options.linkSelector)
			: this.options.linkSelector($(tab_list_container))
		).findAll(function(link){
			return (/^#/).exec((Prototype.Browser.WebKit ? decodeURIComponent(link.href) : link.href).replace(window.location.href.split('#')[0],''));
		}).each(function(link){
			this.addTab(link);
		}.bind(this));
		this.containers.values().each(Element.hide);
		if(this.options.defaultTab == 'first')
			this.setActiveTab(this.links.first());
		else if(this.options.defaultTab == 'last')
			this.setActiveTab(this.links.last());
		else
			this.setActiveTab(this.options.defaultTab);
		var targets = this.options.targetRegExp.exec(window.location);
		if(targets && targets[1]){
			targets[1].split(',').each(function(target){
				this.setActiveTab(this.links.find(function(link){
					return link.key == target;
				}));
			}.bind(this));
		}
		if(this.options.autoLinkExternal){
			$A(document.getElementsByTagName('a')).each(function(a){
				if(!this.links.include(a)){
					var clean_href = a.href.replace(window.location.href.split('#')[0],'');
					if(clean_href.substring(0,1) == '#'){
						if(this.containers.keys().include(clean_href.substring(1))){
							$(a).observe('click',function(event,clean_href){
								this.setActiveTab(clean_href.substring(1));
							}.bindAsEventListener(this,clean_href));
						}
					}
				}
			}.bind(this));
		}
	},
	addTab: function(link){
		this.links.push(link);
		link.key = link.getAttribute('href').replace(window.location.href.split('#')[0],'').split('/').last().replace(/#/,'');
		var container = $(link.key);
		if(!container)
			throw "Control.Tabs: #" + link.key + " was not found on the page."
		this.containers.set(link.key,container);
		link[this.options.hover ? 'onmouseover' : 'onclick'] = function(link){
			if(window.event)
				Event.stop(window.event);
			this.setActiveTab(link);
			return false;
		}.bind(this,link);
	},
	setActiveTab: function(link){
		if(!link && typeof(link) == 'undefined')
			return;
		if(typeof(link) == 'string'){
			this.setActiveTab(this.links.find(function(_link){
				return _link.key == link;
			}));
		}else if(typeof(link) == 'number'){
			this.setActiveTab(this.links[link]);
		}else{
			if(this.notify('beforeChange',this.activeContainer,this.containers.get(link.key)) === false)
				return;
			if(this.activeContainer)
				this.options.hideFunction(this.activeContainer);
			this.links.each(function(item){
				(this.options.setClassOnContainer ? $(item.parentNode) : item).removeClassName(this.options.activeClassName);
			}.bind(this));
			(this.options.setClassOnContainer ? $(link.parentNode) : link).addClassName(this.options.activeClassName);
			this.activeContainer = this.containers.get(link.key);
			this.activeLink = link;
			this.options.showFunction(this.containers.get(link.key));
			this.notify('afterChange',this.containers.get(link.key));
		}
	},
	next: function(){
		this.links.each(function(link,i){
			if(this.activeLink == link && this.links[i + 1]){
				this.setActiveTab(this.links[i + 1]);
				throw $break;
			}
		}.bind(this));
	},
	previous: function(){
		this.links.each(function(link,i){
			if(this.activeLink == link && this.links[i - 1]){
				this.setActiveTab(this.links[i - 1]);
				throw $break;
			}
		}.bind(this));
	},
	first: function(){
		this.setActiveTab(this.links.first());
	},
	last: function(){
		this.setActiveTab(this.links.last());
	}
});
Object.extend(Control.Tabs,{
	instances: [],
	findByTabId: function(id){
		return Control.Tabs.instances.find(function(tab){
			return tab.links.find(function(link){
				return link.key == id;
			});
		});
	}
});
Object.Event.extend(Control.Tabs);/**
* @author Ryan Johnson <http://syntacticx.com/>
* @copyright 2008 PersonalGrid Corporation <http://personalgrid.com/>
* @package LivePipe UI
* @license MIT
* @url http://livepipe.net/control/window
* @require prototype.js, effects.js, draggable.js, resizable.js, livepipe.js
*/
 
//adds onDraw and constrainToViewport option to draggable
if(typeof(Draggable) != 'undefined'){
  //allows the point to be modified with an onDraw callback
  Draggable.prototype.draw = function(point) {
    var pos = Position.cumulativeOffset(this.element);
    if(this.options.ghosting) {
      var r = Position.realOffset(this.element);
      pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;
    }
    
    var d = this.currentDelta();
    pos[0] -= d[0]; pos[1] -= d[1];
    
    if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) {
      pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft;
      pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop;
    }
    
    var p = [0,1].map(function(i){
      return (point[i]-pos[i]-this.offset[i])
    }.bind(this));
    
    if(this.options.snap) {
      if(typeof this.options.snap == 'function') {
        p = this.options.snap(p[0],p[1],this);
      } else {
        if(this.options.snap instanceof Array) {
          p = p.map( function(v, i) {return Math.round(v/this.options.snap[i])*this.options.snap[i] }.bind(this))
        } else {
          p = p.map( function(v) {return Math.round(v/this.options.snap)*this.options.snap }.bind(this))
         }
      }
    }
    
    if(this.options.onDraw)
      this.options.onDraw.bind(this)(p);
    else{
      var style = this.element.style;
      if(this.options.constrainToViewport){
        var viewport_dimensions = document.viewport.getDimensions();
        var container_dimensions = this.element.getDimensions();
        var margin_top = parseInt(this.element.getStyle('margin-top'));
        var margin_left = parseInt(this.element.getStyle('margin-left'));
        var boundary = [[
          0 - margin_left,
          0 - margin_top
        ],[
          (viewport_dimensions.width - container_dimensions.width) - margin_left,
          (viewport_dimensions.height - container_dimensions.height) - margin_top
        ]];
        if((!this.options.constraint) || (this.options.constraint=='horizontal')){
          if((p[0] >= boundary[0][0]) && (p[0] <= boundary[1][0]))
            this.element.style.left = p[0] + "px";
          else
            this.element.style.left = ((p[0] < boundary[0][0]) ? boundary[0][0] : boundary[1][0]) + "px";
        }
        if((!this.options.constraint) || (this.options.constraint=='vertical')){
          if((p[1] >= boundary[0][1] ) && (p[1] <= boundary[1][1]))
            this.element.style.top = p[1] + "px";
         else
            this.element.style.top = ((p[1] <= boundary[0][1]) ? boundary[0][1] : boundary[1][1]) + "px";      
        }
      }else{
        if((!this.options.constraint) || (this.options.constraint=='horizontal'))
         style.left = p[0] + "px";
        if((!this.options.constraint) || (this.options.constraint=='vertical'))
         style.top   = p[1] + "px";
      }
      if(style.visibility=="hidden")
        style.visibility = ""; // fix gecko rendering
    }
  };
}
 
if(typeof(Prototype) == "undefined")
  throw "Control.Window requires Prototype to be loaded.";
if(typeof(IframeShim) == "undefined")
  throw "Control.Window requires IframeShim to be loaded.";
if(typeof(Object.Event) == "undefined")
  throw "Control.Window requires Object.Event to be loaded.";
/*
  known issues:
    - when iframe is clicked is does not gain focus
    - safari can't open multiple iframes properly
    - constrainToViewport: body must have no margin or padding for this to work properly
    - iframe will be mis positioned during fade in
    - document.viewport does not account for scrollbars (this will eventually be fixed in the prototype core)
  notes
    - setting constrainToViewport only works when the page is not scrollable
    - setting draggable: true will negate the effects of position: center
*/
Control.Window = Class.create({
  initialize: function(container,options){
    Control.Window.windows.push(this);
    
    //attribute initialization
    this.container = false;
    this.isOpen = false;
    this.href = false;
    this.sourceContainer = false; //this is optionally the container that will open the window
    this.ajaxRequest = false;
    this.remoteContentLoaded = false; //this is set when the code to load the remote content is run, onRemoteContentLoaded is fired when the connection is closed
    this.numberInSequence = Control.Window.windows.length + 1; //only useful for the effect scoping
    this.indicator = false;
    this.effects = {
      fade: false,
      appear: false
    };
    this.indicatorEffects = {
      fade: false,
      appear: false
    };
    
    //options
    this.options = Object.extend({
      //lifecycle
      beforeOpen: Prototype.emptyFunction,
      afterOpen: Prototype.emptyFunction,
      beforeClose: Prototype.emptyFunction,
      afterClose: Prototype.emptyFunction,
      //dimensions and modes
      height: null,
      width: null,
      className: false,
      position: 'center', //'center', 'relative', [x,y], [function(){return x;},function(){return y;}]
      offsetLeft: 0, //available only for anchors opening the window, or windows set to position: hover
      offsetTop: 0, //""
      iframe: false, //if the window has an href, this will display the href as an iframe instead of requesting the url as an an Ajax.Request
      hover: false, //element object to hover over, or if "true" only available for windows with sourceContainer (an anchor or any element already on the page with an href attribute)
      indicator: false, //element to show or hide when ajax requests, images and iframes are loading
      closeOnClick: false, //does not work with hover,can be: true (click anywhere), 'container' (will refer to this.container), or element (a specific element)
      iframeshim: true, //wether or not to position an iFrameShim underneath the window
      //effects
      fade: false,
      fadeDuration: 0.75,
      //draggable
      draggable: false,
      onDrag: Prototype.emptyFunction,
      //resizable
      resizable: false,
      minHeight: false,
      minWidth: false,
      maxHeight: false,
      maxWidth: false,
      onResize: Prototype.emptyFunction,
      //draggable and resizable
      constrainToViewport: false,
      //ajax
      method: 'post',
      parameters: {},
      onComplete: Prototype.emptyFunction,
      onSuccess: Prototype.emptyFunction,
      onFailure: Prototype.emptyFunction,
      onException: Prototype.emptyFunction,
      //any element with an href (image,iframe,ajax) will call this after it is done loading
      onRemoteContentLoaded: Prototype.emptyFunction,
      insertRemoteContentAt: false //false will set this to this.container, can be string selector (first returned will be selected), or an Element that must be a child of this.container
    },options || {});
    
    //container setup
    this.indicator = this.options.indicator ? $(this.options.indicator) : false;
    if(container){
      if(typeof(container) == "string" && container.match(Control.Window.uriRegex))
        this.href = container;
      else{
        this.container = $(container);
        //need to create the container now for tooltips (or hover: element with no container already on the page)
        //second call made below will not create the container since the check is done inside createDefaultContainer()
        this.createDefaultContainer(container);
        //if an element with an href was passed in we use it to activate the window
        if(this.container && ((this.container.readAttribute('href') && this.container.readAttribute('href') != '') || (this.options.hover && this.options.hover !== true))){            
          if(this.options.hover && this.options.hover !== true)
            this.sourceContainer = $(this.options.hover);
          else{
            this.sourceContainer = this.container;
            this.href = this.container.readAttribute('href');
            var rel = this.href.match(/^#(.+)$/);
            if(rel && rel[1]){
              this.container = $(rel[1]);
              this.href = false;
            }else
              this.container = false;
          }
          //hover or click handling
          this.sourceContainerOpenHandler = function(event){
            this.open(event);
            event.stop();
            return false;
          }.bindAsEventListener(this);
          this.sourceContainerCloseHandler = function(event){
            this.close(event);
          }.bindAsEventListener(this);
          this.sourceContainerMouseMoveHandler = function(event){
            this.position(event);
          }.bindAsEventListener(this);
          if(this.options.hover){
            this.sourceContainer.observe('mouseenter',this.sourceContainerOpenHandler);
            this.sourceContainer.observe('mouseleave',this.sourceContainerCloseHandler);
            if(this.options.position == 'mouse')
              this.sourceContainer.observe('mousemove',this.sourceContainerMouseMoveHandler);
          }else
            this.sourceContainer.observe('click',this.sourceContainerOpenHandler);
        }
      }
    }
    this.createDefaultContainer(container);
    if(this.options.insertRemoteContentAt === false)
      this.options.insertRemoteContentAt = this.container;
    var styles = {
      margin: 0,
      position: 'absolute',
      zIndex: Control.Window.initialZIndexForWindow()
    };
    if(this.options.width)
      styles.width = $value(this.options.width) + 'px';
    if(this.options.height)
      styles.height = $value(this.options.height) + 'px';
    this.container.setStyle(styles);
    if(this.options.className)
      this.container.addClassName(this.options.className);
    this.positionHandler = this.position.bindAsEventListener(this);
    this.outOfBoundsPositionHandler = this.ensureInBounds.bindAsEventListener(this);
    this.bringToFrontHandler = this.bringToFront.bindAsEventListener(this);
    this.container.observe('mousedown',this.bringToFrontHandler);
    this.container.hide();
    this.closeHandler = this.close.bindAsEventListener(this);
    //iframeshim setup
    if(this.options.iframeshim){
      this.iFrameShim = new IframeShim();
      this.iFrameShim.hide();
    }
    //resizable support
    this.applyResizable();
    //draggable support
    this.applyDraggable();
    
    //makes sure the window can't go out of bounds
    Event.observe(window,'resize',this.outOfBoundsPositionHandler);
    
    this.notify('afterInitialize');
  },
  open: function(event){
    if(this.isOpen){
      this.bringToFront();
      return false;
    }
    if(this.notify('beforeOpen') === false)
      return false;
    //closeOnClick
    if(this.options.closeOnClick){
      if(this.options.closeOnClick === true)
        this.closeOnClickContainer = $(document.body);
      else if(this.options.closeOnClick == 'container')
        this.closeOnClickContainer = this.container;
      else if (this.options.closeOnClick == 'overlay'){
        Control.Overlay.load();
        this.closeOnClickContainer = Control.Overlay.container;
      }else
        this.closeOnClickContainer = $(this.options.closeOnClick);
      this.closeOnClickContainer.observe('click',this.closeHandler);
    }
    if(this.href && !this.options.iframe && !this.remoteContentLoaded){
      //link to image
      this.remoteContentLoaded = true;
      if(this.href.match(/\.(jpe?g|gif|png|tiff?)$/i)){
        var img = new Element('img');
        img.observe('load',function(img){
          this.getRemoteContentInsertionTarget().insert(img);
          this.position();
          if(this.notify('onRemoteContentLoaded') !== false){
            if(this.options.indicator)
              this.hideIndicator();
            this.finishOpen();
          }
        }.bind(this,img));
        img.writeAttribute('src',this.href);
      }else{
        //if this is an ajax window it will only open if the request is successful
        if(!this.ajaxRequest){
          if(this.options.indicator)
            this.showIndicator();
          this.ajaxRequest = new Ajax.Request(this.href,{
            method: this.options.method,
            parameters: this.options.parameters,
            onComplete: function(request){
              this.notify('onComplete',request);
              this.ajaxRequest = false;
            }.bind(this),
            onSuccess: function(request){
              this.getRemoteContentInsertionTarget().insert(request.responseText);
              this.notify('onSuccess',request);
              if(this.notify('onRemoteContentLoaded') !== false){
                if(this.options.indicator)
                  this.hideIndicator();
                this.finishOpen();
              }
            }.bind(this),
            onFailure: function(request){
              this.notify('onFailure',request);
              if(this.options.indicator)
                this.hideIndicator();
            }.bind(this),
            onException: function(request,e){
              this.notify('onException',request,e);
              if(this.options.indicator)
                this.hideIndicator();
            }.bind(this)
          });
        }
      }
      return true;
    }else if(this.options.iframe && !this.remoteContentLoaded){
      //iframe
      this.remoteContentLoaded = true;
      if(this.options.indicator)
        this.showIndicator();
      this.getRemoteContentInsertionTarget().insert(Control.Window.iframeTemplate.evaluate({
        href: this.href
      }));
      var iframe = this.container.down('iframe');
      iframe.onload = function(){
        this.notify('onRemoteContentLoaded');
        if(this.options.indicator)
          this.hideIndicator();
        iframe.onload = null;
      }.bind(this);
    }
    this.finishOpen(event);
    return true
  },
  close: function(event){ //event may or may not be present
    if(!this.isOpen || this.notify('beforeClose',event) === false)
      return false;
    if(this.options.closeOnClick)
      this.closeOnClickContainer.stopObserving('click',this.closeHandler);
    if(this.options.fade){
      this.effects.fade = new Effect.Fade(this.container,{
        queue: {
          position: 'front',
          scope: 'Control.Window' + this.numberInSequence
        },
        from: 1,
        to: 0,
        duration: this.options.fadeDuration / 2,
        afterFinish: function(){
          if(this.iFrameShim)
            this.iFrameShim.hide();
          this.isOpen = false;
          this.notify('afterClose');
        }.bind(this)
      });
    }else{
      this.container.hide();
      if(this.iFrameShim)
        this.iFrameShim.hide();
    }
    if(this.ajaxRequest)
      this.ajaxRequest.transport.abort();
    if(!(this.options.draggable || this.options.resizable) && this.options.position == 'center')
      Event.stopObserving(window,'resize',this.positionHandler);
    if(!this.options.draggable && this.options.position == 'center')
      Event.stopObserving(window,'scroll',this.positionHandler);
    if(this.options.indicator)
      this.hideIndicator();
    if(!this.options.fade){
      this.isOpen = false;
      this.notify('afterClose');
        }
    return true;
  },
  position: function(event){
    //this is up top for performance reasons
    if(this.options.position == 'mouse'){
      var xy = [Event.pointerX(event),Event.pointerY(event)];
      this.container.setStyle({
        top: xy[1] + $value(this.options.offsetTop) + 'px',
        left: xy[0] + $value(this.options.offsetLeft) + 'px'
      });
      return;
    }
    var container_dimensions = this.container.getDimensions();
    var viewport_dimensions = document.viewport.getDimensions();
    Position.prepare();
    var offset_left = (Position.deltaX + Math.floor((viewport_dimensions.width - container_dimensions.width) / 2));
    var offset_top = (Position.deltaY + ((viewport_dimensions.height > container_dimensions.height) ? Math.floor((viewport_dimensions.height - container_dimensions.height) / 2) : 0));
    if(this.options.position == 'center'){
      this.container.setStyle({
        top: (container_dimensions.height <= viewport_dimensions.height) ? ((offset_top != null && offset_top > 0) ? offset_top : 0) + 'px' : 0,
        left: (container_dimensions.width <= viewport_dimensions.width) ? ((offset_left != null && offset_left > 0) ? offset_left : 0) + 'px' : 0
      });
    }else if(this.options.position == 'relative'){
      var xy = this.sourceContainer.cumulativeOffset();
      var top = xy[1] + $value(this.options.offsetTop);
      var left = xy[0] + $value(this.options.offsetLeft);
      this.container.setStyle({
        top: (container_dimensions.height <= viewport_dimensions.height) ? (this.options.constrainToViewport ? Math.max(0,Math.min(viewport_dimensions.height - (container_dimensions.height),top)) : top) + 'px' : 0,
        left: (container_dimensions.width <= viewport_dimensions.width) ? (this.options.constrainToViewport ? Math.max(0,Math.min(viewport_dimensions.width - (container_dimensions.width),left)) : left) + 'px' : 0
      });
    }else if(this.options.position.length){
      var top = $value(this.options.position[1]) + $value(this.options.offsetTop);
      var left = $value(this.options.position[0]) + $value(this.options.offsetLeft);
      this.container.setStyle({
        top: (container_dimensions.height <= viewport_dimensions.height) ? (this.options.constrainToViewport ? Math.max(0,Math.min(viewport_dimensions.height - (container_dimensions.height),top)) : top) + 'px' : 0,
        left: (container_dimensions.width <= viewport_dimensions.width) ? (this.options.constrainToViewport ? Math.max(0,Math.min(viewport_dimensions.width - (container_dimensions.width),left)) : left) + 'px' : 0
      });
    }
    if(this.iFrameShim)
      this.updateIFrameShimZIndex();
  },
  ensureInBounds: function(){
    if(!this.isOpen)
      return;
    var viewport_dimensions = document.viewport.getDimensions();
    var container_offset = this.container.cumulativeOffset();
    var container_dimensions = this.container.getDimensions();
    if(container_offset.left + container_dimensions.width > viewport_dimensions.width){
      this.container.setStyle({
        left: (Math.max(0,viewport_dimensions.width - container_dimensions.width)) + 'px'
      });
    }
    if(container_offset.top + container_dimensions.height > viewport_dimensions.height){
      this.container.setStyle({
        top: (Math.max(0,viewport_dimensions.height - container_dimensions.height)) + 'px'
      });
    }
  },
  bringToFront: function(){
    Control.Window.bringToFront(this);
    this.notify('bringToFront');
  },
  destroy: function(){
    this.container.stopObserving('mousedown',this.bringToFrontHandler);
    if(this.draggable){
      Draggables.removeObserver(this.container);
      this.draggable.handle.stopObserving('mousedown',this.bringToFrontHandler);
      this.draggable.destroy();
    }
    if(this.resizable){
      Resizables.removeObserver(this.container);
      this.resizable.handle.stopObserving('mousedown',this.bringToFrontHandler);
      this.resizable.destroy();
    }
    if(this.container && !this.sourceContainer)
      this.container.remove();
    if(this.sourceContainer){
      if(this.options.hover){
        this.sourceContainer.stopObserving('mouseenter',this.sourceContainerOpenHandler);
        this.sourceContainer.stopObserving('mouseleave',this.sourceContainerCloseHandler);
        if(this.options.position == 'mouse')
          this.sourceContainer.stopObserving('mousemove',this.sourceContainerMouseMoveHandler);
      }else
        this.sourceContainer.stopObserving('click',this.sourceContainerOpenHandler);
    }
    if(this.iFrameShim)
      this.iFrameShim.destroy();
    Event.stopObserving(window,'resize',this.outOfBoundsPositionHandler);
    Control.Window.windows = Control.Window.windows.without(this);
    this.notify('afterDestroy');
  },
  //private
  applyResizable: function(){
    if(this.options.resizable){
      if(typeof(Resizable) == "undefined")
        throw "Control.Window requires resizable.js to be loaded.";
      var resizable_handle = null;
      if(this.options.resizable === true){
        resizable_handle = new Element('div',{
          className: 'resizable_handle'
        });
        this.container.insert(resizable_handle);
      }else
        resizable_handle = $(this.options.resziable);
      this.resizable = new Resizable(this.container,{
        handle: resizable_handle,
        minHeight: this.options.minHeight,
        minWidth: this.options.minWidth,
        maxHeight: this.options.constrainToViewport ? function(element){
          //viewport height - top - total border height
          return (document.viewport.getDimensions().height - parseInt(element.style.top || 0)) - (element.getHeight() - parseInt(element.style.height || 0));
        } : this.options.maxHeight,
        maxWidth: this.options.constrainToViewport ? function(element){
          //viewport width - left - total border width
          return (document.viewport.getDimensions().width - parseInt(element.style.left || 0)) - (element.getWidth() - parseInt(element.style.width || 0));
        } : this.options.maxWidth
      });
      this.resizable.handle.observe('mousedown',this.bringToFrontHandler);
      Resizables.addObserver(new Control.Window.LayoutUpdateObserver(this,function(){
        if(this.iFrameShim)
          this.updateIFrameShimZIndex();
        this.notify('onResize');
      }.bind(this)));
    }
  },
  applyDraggable: function(){
    if(this.options.draggable){
      if(typeof(Draggables) == "undefined")
        throw "Control.Window requires dragdrop.js to be loaded.";
      var draggable_handle = null;
      if(this.options.draggable === true){
        draggable_handle = new Element('div',{
          className: 'draggable_handle'
        });
        this.container.insert(draggable_handle);
      }else
        draggable_handle = $(this.options.draggable);
      this.draggable = new Draggable(this.container,{
        handle: draggable_handle,
        constrainToViewport: this.options.constrainToViewport,
        zindex: this.container.getStyle('z-index'),
        starteffect: function(){
          if(Prototype.Browser.IE){
            this.old_onselectstart = document.onselectstart;
            document.onselectstart = function(){
              return false;
            };
          }
        }.bind(this),
        endeffect: function(){
          document.onselectstart = this.old_onselectstart;
        }.bind(this)
      });
      this.draggable.handle.observe('mousedown',this.bringToFrontHandler);
      Draggables.addObserver(new Control.Window.LayoutUpdateObserver(this,function(){
        if(this.iFrameShim)
          this.updateIFrameShimZIndex();
        this.notify('onDrag');
      }.bind(this)));
    }
  },
  createDefaultContainer: function(container){
    if(!this.container){
      //no container passed or found, create it
      this.container = new Element('div',{
        id: 'control_window_' + this.numberInSequence
      });
      $(document.body).insert(this.container);
      if(typeof(container) == "string" && $(container) == null && !container.match(/^#(.+)$/) && !container.match(Control.Window.uriRegex))
        this.container.update(container);
    }
  },
  finishOpen: function(event){
    this.bringToFront();
    if(this.options.fade){
      if(typeof(Effect) == "undefined")
        throw "Control.Window requires effects.js to be loaded."
      if(this.effects.fade)
        this.effects.fade.cancel();
      this.effects.appear = new Effect.Appear(this.container,{
        queue: {
          position: 'end',
          scope: 'Control.Window.' + this.numberInSequence
        },
        from: 0,
        to: 1,
        duration: this.options.fadeDuration / 2,
        afterFinish: function(){
          if(this.iFrameShim)
            this.updateIFrameShimZIndex();
          this.isOpen = true;
          this.notify('afterOpen');
        }.bind(this)
      });
    }else
      this.container.show();
    this.position(event);
    if(!(this.options.draggable || this.options.resizable) && this.options.position == 'center')
      Event.observe(window,'resize',this.positionHandler,false);
    if(!this.options.draggable && this.options.position == 'center')
      Event.observe(window,'scroll',this.positionHandler,false);
    if(!this.options.fade){
      this.isOpen = true;
      this.notify('afterOpen');
    }
    return true;
  },
  showIndicator: function(){
    this.showIndicatorTimeout = window.setTimeout(function(){
      if(this.options.fade){
        this.indicatorEffects.appear = new Effect.Appear(this.indicator,{
          queue: {
            position: 'front',
            scope: 'Control.Window.indicator.' + this.numberInSequence
          },
          from: 0,
          to: 1,
          duration: this.options.fadeDuration / 2
        });
      }else
        this.indicator.show();
    }.bind(this),Control.Window.indicatorTimeout);
  },
  hideIndicator: function(){
    if(this.showIndicatorTimeout)
      window.clearTimeout(this.showIndicatorTimeout);
    this.indicator.hide();
  },
  getRemoteContentInsertionTarget: function(){
    return typeof(this.options.insertRemoteContentAt) == "string" ? this.container.down(this.options.insertRemoteContentAt) : $(this.options.insertRemoteContentAt);
  },
  updateIFrameShimZIndex: function(){
    if(this.iFrameShim)
      this.iFrameShim.positionUnder(this.container);
  }
});
//class methods
Object.extend(Control.Window,{
  windows: [],
  baseZIndex: 9999,
  indicatorTimeout: 250,
  iframeTemplate: new Template('<iframe src="#{href}" width="100%" height="100%" frameborder="0"></iframe>'),
  uriRegex: /^(\/|\#|https?\:\/\/|[\w]+\/)/,
  bringToFront: function(w){
    Control.Window.windows = Control.Window.windows.without(w);
    Control.Window.windows.push(w);
    Control.Window.windows.each(function(w,i){
      var z_index = Control.Window.baseZIndex + i;
      w.container.setStyle({
        zIndex: z_index
      });
      if(w.isOpen){
        if(w.iFrameShim)
        w.updateIFrameShimZIndex();
      }
      if(w.options.draggable)
        w.draggable.options.zindex = z_index;
    });
  },
  open: function(container,options){
    var w = new Control.Window(container,options);
    w.open();
    return w;
  },
  //protected
  initialZIndexForWindow: function(w){
    return Control.Window.baseZIndex + (Control.Window.windows.length - 1);
  }
});
Object.Event.extend(Control.Window);
 
//this is the observer for both Resizables and Draggables
Control.Window.LayoutUpdateObserver = Class.create({
  initialize: function(w,observer){
    this.w = w;
    this.element = $(w.container);
    this.observer = observer;
  },
  onStart: Prototype.emptyFunction,
  onEnd: function(event_name,instance){
    if(instance.element == this.element && this.iFrameShim)
      this.w.updateIFrameShimZIndex();
  },
  onResize: function(event_name,instance){
    if(instance.element == this.element)
      this.observer(this.element);
  },
  onDrag: function(event_name,instance){
    if(instance.element == this.element)
      this.observer(this.element);
  }
});
 
//overlay for Control.Modal
Control.Overlay = {
  id: 'control_overlay',
  loaded: false,
  container: false,
  lastOpacity: 0,
  styles: {
    position: 'fixed',
    top: 0,
    left: 0,
    width: '100%',
    height: '100%',
    zIndex: 9998
  },
  ieStyles: {
    position: 'absolute',
    top: 0,
    left: 0,
    zIndex: 9998
  },
  effects: {
    fade: false,
    appear: false
  },
  load: function(){
    if(Control.Overlay.loaded)
      return false;
    Control.Overlay.loaded = true;
    Control.Overlay.container = new Element('div',{
      id: Control.Overlay.id
    });
    $(document.body).insert(Control.Overlay.container);
    if(Prototype.Browser.IE){
      Control.Overlay.container.setStyle(Control.Overlay.ieStyles);
      Event.observe(window,'scroll',Control.Overlay.positionOverlay);
      Event.observe(window,'resize',Control.Overlay.positionOverlay);
      Control.Overlay.observe('beforeShow',Control.Overlay.positionOverlay);
    }else
      Control.Overlay.container.setStyle(Control.Overlay.styles);
    Control.Overlay.iFrameShim = new IframeShim();
    Control.Overlay.iFrameShim.hide();
    Event.observe(window,'resize',Control.Overlay.positionIFrameShim);
    Control.Overlay.container.hide();
    return true;
  },
  unload: function(){
    if(!Control.Overlay.loaded)
      return false;
    Event.stopObserving(window,'resize',Control.Overlay.positionOverlay);
    Control.Overlay.stopObserving('beforeShow',Control.Overlay.positionOverlay);
    Event.stopObserving(window,'resize',Control.Overlay.positionIFrameShim);
    Control.Overlay.iFrameShim.destroy();
    Control.Overlay.container.remove();
    Control.Overlay.loaded = false;
    return true;
  },
  show: function(opacity,fade){
    if(Control.Overlay.notify('beforeShow') === false)
      return false;
    Control.Overlay.lastOpacity = opacity;
    Control.Overlay.positionIFrameShim();
    Control.Overlay.iFrameShim.show();
    if(fade){
      if(typeof(Effect) == "undefined")
        throw "Control.Window requires effects.js to be loaded."
      if(Control.Overlay.effects.fade)
        Control.Overlay.effects.fade.cancel();
      Control.Overlay.effects.appear = new Effect.Appear(Control.Overlay.container,{
        queue: {
          position: 'end',
          scope: 'Control.Overlay'
        },
        afterFinish: function(){
          Control.Overlay.notify('afterShow');
        },
        from: 0,
        to: Control.Overlay.lastOpacity,
        duration: (fade === true ? 0.75 : fade) / 2
      });
    }else{
      Control.Overlay.container.setStyle({
        opacity: opacity || 1
      });
      Control.Overlay.container.show();
      Control.Overlay.notify('afterShow');
    }
    return true;
  },
  hide: function(fade){
    if(Control.Overlay.notify('beforeHide') === false)
      return false;
    if(Control.Overlay.effects.appear)
      Control.Overlay.effects.appear.cancel();
    Control.Overlay.iFrameShim.hide();
    if(fade){
      Control.Overlay.effects.fade = new Effect.Fade(Control.Overlay.container,{
        queue: {
          position: 'front',
          scope: 'Control.Overlay'
        },
        afterFinish: function(){
          Control.Overlay.notify('afterHide');
        },
        from: Control.Overlay.lastOpacity,
        to: 0,
        duration: (fade === true ? 0.75 : fade) / 2
      });
    }else{
      Control.Overlay.container.hide();
      Control.Overlay.notify('afterHide');
    }
    return true;
  },
  positionIFrameShim: function(){
    if(Control.Overlay.container.visible())
      Control.Overlay.iFrameShim.positionUnder(Control.Overlay.container);
  },
  //IE only
  positionOverlay: function(){
    Control.Overlay.container.setStyle({
      width: document.body.clientWidth + 'px',
      height: document.body.clientHeight + 'px'
    });
  }
};
Object.Event.extend(Control.Overlay);
 
Control.ToolTip = Class.create(Control.Window,{
  initialize: function($super,container,tooltip,options){
    $super(tooltip,Object.extend(Object.extend(Object.clone(Control.ToolTip.defaultOptions),options || {}),{
      position: 'mouse',
      hover: container
    }));
  }
});
Object.extend(Control.ToolTip,{
  defaultOptions: {
    offsetLeft: 10
  }
});
 
Control.Modal = Class.create(Control.Window,{
  initialize: function($super,container,options){
    Control.Modal.InstanceMethods.beforeInitialize.bind(this)();
    $super(container,Object.extend(Object.clone(Control.Modal.defaultOptions),options || {}));
  }
});
Object.extend(Control.Modal,{
  defaultOptions: {
    overlayOpacity: 0.5,
    closeOnClick: 'overlay'
  },
  current: false,
  open: function(container,options){
    var modal = new Control.Modal(container,options);
    modal.open();
    return modal;
  },
  close: function(){
    if(Control.Modal.current)
      Control.Modal.current.close();
  },
  InstanceMethods: {
    beforeInitialize: function(){
      Control.Overlay.load();
      this.overlayFinishedOpening = false;
      this.observe('beforeOpen',Control.Modal.Observers.beforeOpen.bind(this));
      this.observe('afterOpen',Control.Modal.Observers.afterOpen.bind(this));
      this.observe('afterClose',Control.Modal.Observers.afterClose.bind(this));
    }
  },
  Observers: {
    beforeOpen: function(){
      if(!this.overlayFinishedOpening){
        Control.Overlay.observeOnce('afterShow',function(){
          this.overlayFinishedOpening = true;
          this.open();
        }.bind(this));
        Control.Overlay.show(this.options.overlayOpacity,this.options.fade ? this.options.fadeDuration : false);
        throw $break;
      }else
      Control.Window.windows.without(this).invoke('close');
    },
    afterOpen: function(){
      Control.Modal.current = this;
    },
    afterClose: function(){
      Control.Overlay.hide(this.options.fade ? this.options.fadeDuration : false);
      Control.Modal.current = false;
      this.overlayFinishedOpening = false;
    }
  }
});
 
Control.LightBox = Class.create(Control.Window,{
  initialize: function($super,container,options){
    this.allImagesLoaded = false;
    if(options.modal){
      var options = Object.extend(Object.clone(Control.LightBox.defaultOptions),options || {});
      options = Object.extend(Object.clone(Control.Modal.defaultOptions),options);
      options = Control.Modal.InstanceMethods.beforeInitialize.bind(this)(options);
      $super(container,options);
    }else
      $super(container,Object.extend(Object.clone(Control.LightBox.defaultOptions),options || {}));
    this.hasRemoteContent = this.href && !this.options.iframe;
    if(this.hasRemoteContent)
      this.observe('onRemoteContentLoaded',Control.LightBox.Observers.onRemoteContentLoaded.bind(this));
    else
      this.applyImageObservers();
    this.observe('beforeOpen',Control.LightBox.Observers.beforeOpen.bind(this));
  },
  applyImageObservers:function(){
    var images = this.getImages();
    this.numberImagesToLoad = images.length;
    this.numberofImagesLoaded = 0;
    images.each(function(image){
      image.observe('load',function(image){
        ++this.numberofImagesLoaded;
        if(this.numberImagesToLoad == this.numberofImagesLoaded){
          this.allImagesLoaded = true;
          this.onAllImagesLoaded();
        }
      }.bind(this,image));
      image.hide();
    }.bind(this));
  },
  onAllImagesLoaded: function(){
    this.getImages().each(function(image){
      this.showImage(image);
    }.bind(this));
    if(this.hasRemoteContent){
      if(this.options.indicator)
        this.hideIndicator();
      this.finishOpen();
    }else
      this.open();
  },
  getImages: function(){
    return this.container.select(Control.LightBox.imageSelector);
  },
  showImage: function(image){
    image.show();
  }
});
Object.extend(Control.LightBox,{
  imageSelector: 'img',
  defaultOptions: {},
  Observers: {
    beforeOpen: function(){
      if(!this.hasRemoteContent && !this.allImagesLoaded)
        throw $break;
    },
    onRemoteContentLoaded: function(){
      this.applyImageObservers();
      if(!this.allImagesLoaded)
        throw $break;
    }
  }
});var mboxCopyright = "Copyright 1996-2010. Adobe Systems Incorporated. All rights reserved";mboxUrlBuilder = function(a, b) { this.a = a; this.b = b; this.c = new Array(); this.d = function(e) { return e; }; this.f = null;};mboxUrlBuilder.prototype.addParameter = function(g, h) { var i = new RegExp('(\'|")'); if (i.exec(g)) { throw "Parameter '" + g + "' contains invalid characters"; } for (var j = 0; j < this.c.length; j++) { var k = this.c[j]; if (k.name == g) { k.value = h; return this; } } var l = new Object(); l.name = g; l.value = h; this.c[this.c.length] = l; return this;};mboxUrlBuilder.prototype.addParameters = function(c) { if (!c) { return this; } for (var j = 0; j < c.length; j++) { var m = c[j].indexOf('='); if (m == -1 || m == 0) { continue; } this.addParameter(c[j].substring(0, m), c[j].substring(m + 1, c[j].length)); } return this;};mboxUrlBuilder.prototype.setServerType = function(n) { this.o = n;};mboxUrlBuilder.prototype.setBasePath = function(f) { this.f = f;};mboxUrlBuilder.prototype.setUrlProcessAction = function(p) { this.d = p;};mboxUrlBuilder.prototype.buildUrl = function() { var q = this.f ? this.f : '/m2/' + this.b + '/mbox/' + this.o; var r = document.location.protocol == 'file:' ? 'http:' : document.location.protocol; var e = r + "//" + this.a + q; var s = e.indexOf('?') != -1 ? '&' : '?'; for (var j = 0; j < this.c.length; j++) { var k = this.c[j]; e += s + encodeURIComponent(k.name) + '=' + encodeURIComponent(k.value); s = '&'; } return this.t(this.d(e));};mboxUrlBuilder.prototype.getParameters = function() { return this.c;};mboxUrlBuilder.prototype.setParameters = function(c) { this.c = c;};mboxUrlBuilder.prototype.clone = function() { var u = new mboxUrlBuilder(this.a, this.b); u.setServerType(this.o); u.setBasePath(this.f); u.setUrlProcessAction(this.d); for (var j = 0; j < this.c.length; j++) { u.addParameter(this.c[j].name, this.c[j].value); } return u;};mboxUrlBuilder.prototype.t = function(v) { return v.replace(/\"/g, '&quot;').replace(/>/g, '&gt;');};mboxStandardFetcher = function() { };mboxStandardFetcher.prototype.getType = function() { return 'standard';};mboxStandardFetcher.prototype.fetch = function(w) { w.setServerType(this.getType()); document.write('<' + 'scr' + 'ipt src="' + w.buildUrl() + '" language="JavaScript"><' + '\/scr' + 'ipt>');};mboxStandardFetcher.prototype.cancel = function() { };mboxAjaxFetcher = function() { };mboxAjaxFetcher.prototype.getType = function() { return 'ajax';};mboxAjaxFetcher.prototype.fetch = function(w) { w.setServerType(this.getType()); var e = w.buildUrl(); this.x = document.createElement('script'); this.x.src = e; document.body.appendChild(this.x);};mboxAjaxFetcher.prototype.cancel = function() { };mboxMap = function() { this.y = new Object(); this.z = new Array();};mboxMap.prototype.put = function(A, h) { if (!this.y[A]) { this.z[this.z.length] = A; } this.y[A] = h;};mboxMap.prototype.get = function(A) { return this.y[A];};mboxMap.prototype.remove = function(A) { this.y[A] = undefined;};mboxMap.prototype.each = function(p) { for (var j = 0; j < this.z.length; j++ ) { var A = this.z[j]; var h = this.y[A]; if (h) { var B = p(A, h); if (B === false) { break; } } }};mboxFactory = function(C, b, D) { this.E = false; this.C = C; this.D = D; this.F = new mboxList(); mboxFactories.put(D, this); this.G = typeof document.createElement('div').replaceChild != 'undefined' && (function() { return true; })() && typeof document.getElementById != 'undefined' && typeof (window.attachEvent || document.addEventListener || window.addEventListener) != 'undefined' && typeof encodeURIComponent != 'undefined'; this.H = this.G && mboxGetPageParameter('mboxDisable') == null; var I = D == 'default'; this.J = new mboxCookieManager( 'mbox' + (I ? '' : ('-' + D)), (function() { return mboxCookiePageDomain(); })()); this.H = this.H && this.J.isEnabled() && (this.J.getCookie('disable') == null); if (this.isAdmin()) { this.enable(); } this.K = mboxGenerateId(); this.L = mboxScreenHeight(); this.M = mboxScreenWidth(); this.N = mboxBrowserWidth(); this.O = mboxBrowserHeight(); this.P = mboxScreenColorDepth(); this.Q = mboxBrowserTimeOffset(); this.R = new mboxSession(this.K, 'mboxSession', 'session', 31 * 60, this.J); this.S = new mboxPC('PC', 1209600, this.J); this.w = new mboxUrlBuilder(C, b); this.T(this.w, I); this.U = new Date().getTime(); this.V = this.U; var W = this; this.addOnLoad(function() { W.V = new Date().getTime(); }); if (this.G) { this.addOnLoad(function() { W.getMboxes().each(function(X) { X.setFetcher(new mboxAjaxFetcher()); X.finalize(); }); }); this.limitTraffic(100, 10368000); if (this.H) { this.Y(); this.Z = new mboxSignaler(function(_, c) { return W.create(_, c); }, this.J); } }};mboxFactory.prototype.isEnabled = function() { return this.H;};mboxFactory.prototype.getDisableReason = function() { return this.J.getCookie('disable');};mboxFactory.prototype.isSupported = function() { return this.G;};mboxFactory.prototype.disable = function(ab, bb) { if (typeof ab == 'undefined') { ab = 60 * 60; } if (typeof bb == 'undefined') { bb = 'unspecified'; } if (!this.isAdmin()) { this.H = false; this.J.setCookie('disable', bb, ab); }};mboxFactory.prototype.enable = function() { this.H = true; this.J.deleteCookie('disable');};mboxFactory.prototype.isAdmin = function() { return document.location.href.indexOf('mboxEnv') != -1;};mboxFactory.prototype.limitTraffic = function(cb, ab) {};mboxFactory.prototype.addOnLoad = function(p) { if (window.addEventListener) { window.addEventListener('load', p, false); } else if (document.addEventListener) { document.addEventListener('load', p, false); } else if (document.attachEvent) { window.attachEvent('onload', p); }};mboxFactory.prototype.getEllapsedTime = function() { return this.V - this.U;};mboxFactory.prototype.getEllapsedTimeUntil = function(db) { return db - this.U;};mboxFactory.prototype.getMboxes = function() { return this.F;};mboxFactory.prototype.get = function(_, eb) { return this.F.get(_).getById(eb || 0);};mboxFactory.prototype.update = function(_, c) { if (!this.isEnabled()) { return; } if (this.F.get(_).length() == 0) { throw "Mbox " + _ + " is not defined"; } this.F.get(_).each(function(X) { X.getUrlBuilder() .addParameter('mboxPage', mboxGenerateId()); X.load(c); });};mboxFactory.prototype.create = function( _, c, fb) { if (!this.isSupported()) { return null; } var e = this.w.clone(); e.addParameter('mboxCount', this.F.length() + 1); e.addParameters(c); var eb = this.F.get(_).length(); var gb = this.D + '-' + _ + '-' + eb; var hb; if (fb) { hb = new mboxLocatorNode(fb); } else { if (this.E) { throw 'The page has already been loaded, can\'t write marker'; } hb = new mboxLocatorDefault(gb); } try { var W = this; var ib = 'mboxImported-' + gb; var X = new mbox(_, eb, e, hb, ib); if (this.H) { X.setFetcher(this.E ? new mboxAjaxFetcher() : new mboxStandardFetcher()); } X.setOnError(function(jb, n) { X.setMessage(jb); X.activate(); if (!X.isActivated()) { W.disable(60 * 60, jb); window.location.reload(false); } }); this.F.add(X); } catch (kb) { this.disable(); throw 'Failed creating mbox "' + _ + '", the error was: ' + kb; } var lb = new Date(); e.addParameter('mboxTime', lb.getTime() - (lb.getTimezoneOffset() * 60000)); return X;};mboxFactory.prototype.getCookieManager = function() { return this.J;};mboxFactory.prototype.getPageId = function() { return this.K;};mboxFactory.prototype.getPCId = function() { return this.S;};mboxFactory.prototype.getSessionId = function() { return this.R;};mboxFactory.prototype.getSignaler = function() { return this.Z;};mboxFactory.prototype.getUrlBuilder = function() { return this.w;};mboxFactory.prototype.T = function(e, I) { e.addParameter('mboxHost', document.location.hostname) .addParameter('mboxSession', this.R.getId()); if (!I) { e.addParameter('mboxFactoryId', this.D); } if (this.S.getId() != null) { e.addParameter('mboxPC', this.S.getId()); } e.addParameter('mboxPage', this.K); e.addParameter('screenHeight', this.L); e.addParameter('screenWidth', this.M); e.addParameter('browserWidth', this.N); e.addParameter('browserHeight', this.O); e.addParameter('browserTimeOffset', this.Q); e.addParameter('colorDepth', this.P); e.addParameter('mboxXDomain', "enabled"); e.setUrlProcessAction(function(e) { e += '&mboxURL=' + encodeURIComponent(document.location); var mb = encodeURIComponent(document.referrer); if (e.length + mb.length < 2000) { e += '&mboxReferrer=' + mb; } e += '&mboxVersion=' + mboxVersion; return e; });};mboxFactory.prototype.nb = function() { return "";};mboxFactory.prototype.Y = function() { document.write('<style>.' + 'mboxDefault' + ' { visibility:hidden; }</style>');};mboxFactory.prototype.isDomLoaded = function() { return this.E;};mboxSignaler = function(ob, J) { this.J = J; var pb = J.getCookieNames('signal-'); for (var j = 0; j < pb.length; j++) { var qb = pb[j]; var rb = J.getCookie(qb).split('&'); var X = ob(rb[0], rb); X.load(); J.deleteCookie(qb); }};mboxSignaler.prototype.signal = function(sb, _ ) { this.J.setCookie('signal-' + sb, mboxShiftArray(arguments).join('&'), 45 * 60);};mboxList = function() { this.F = new Array();};mboxList.prototype.add = function(X) { if (X != null) { this.F[this.F.length] = X; }};mboxList.prototype.get = function(_) { var B = new mboxList(); for (var j = 0; j < this.F.length; j++) { var X = this.F[j]; if (X.getName() == _) { B.add(X); } } return B;};mboxList.prototype.getById = function(tb) { return this.F[tb];};mboxList.prototype.length = function() { return this.F.length;};mboxList.prototype.each = function(p) { if (typeof p != 'function') { throw 'Action must be a function, was: ' + typeof(p); } for (var j = 0; j < this.F.length; j++) { p(this.F[j]); }};mboxLocatorDefault = function(g) { this.g = 'mboxMarker-' + g; document.write('<div id="' + this.g + '" style="visibility:hidden;display:none">&nbsp;</div>');};mboxLocatorDefault.prototype.locate = function() { var ub = document.getElementById(this.g); while (ub != null) { if (ub.nodeType == 1) { if (ub.className == 'mboxDefault') { return ub; } } ub = ub.previousSibling; } return null;};mboxLocatorDefault.prototype.force = function() { var vb = document.createElement('div'); vb.className = 'mboxDefault'; var wb = document.getElementById(this.g); wb.parentNode.insertBefore(vb, wb); return vb;};mboxLocatorNode = function(xb) { this.ub = xb;};mboxLocatorNode.prototype.locate = function() { return typeof this.ub == 'string' ? document.getElementById(this.ub) : this.ub;};mboxLocatorNode.prototype.force = function() { return null;};mboxCreate = function(_ ) { var X = mboxFactoryDefault.create( _, mboxShiftArray(arguments)); if (X) { X.load(); } return X;};mboxDefine = function(fb, _ ) { var X = mboxFactoryDefault.create(_, mboxShiftArray(mboxShiftArray(arguments)), fb); return X;};mboxUpdate = function(_ ) { mboxFactoryDefault.update(_, mboxShiftArray(arguments));};mbox = function(g, yb, w, zb, ib) { this.Ab = null; this.Bb = 0; this.hb = zb; this.ib = ib; this.Cb = null; this.Db = new mboxOfferContent(); this.vb = null; this.w = w; this.message = ''; this.Eb = new Object(); this.Fb = 0; this.yb = yb; this.g = g; this.Gb(); w.addParameter('mbox', g) .addParameter('mboxId', yb); this.Hb = function() {}; this.Ib = function() {}; this.Jb = null;};mbox.prototype.getId = function() { return this.yb;};mbox.prototype.Gb = function() { if (this.g.length > 250) { throw "Mbox Name " + this.g + " exceeds max length of " + "250 characters."; } else if (this.g.match(/^\s+|\s+$/g)) { throw "Mbox Name " + this.g + " has leading/trailing whitespace(s)."; }};mbox.prototype.getName = function() { return this.g;};mbox.prototype.getParameters = function() { var c = this.w.getParameters(); var B = new Array(); for (var j = 0; j < c.length; j++) { if (c[j].name.indexOf('mbox') != 0) { B[B.length] = c[j].name + '=' + c[j].value; } } return B;};mbox.prototype.setOnLoad = function(p) { this.Ib = p; return this;};mbox.prototype.setMessage = function(jb) { this.message = jb; return this;};mbox.prototype.setOnError = function(Hb) { this.Hb = Hb; return this;};mbox.prototype.setFetcher = function(Kb) { if (this.Cb) { this.Cb.cancel(); } this.Cb = Kb; return this;};mbox.prototype.getFetcher = function() { return this.Cb;};mbox.prototype.load = function(c) { if (this.Cb == null) { return this; } this.setEventTime("load.start"); this.cancelTimeout(); this.Bb = 0; var w = (c && c.length > 0) ? this.w.clone().addParameters(c) : this.w; this.Cb.fetch(w); var W = this; this.Lb = setTimeout(function() { W.Hb('browser timeout', W.Cb.getType()); }, 15000); this.setEventTime("load.end"); return this;};mbox.prototype.loaded = function() { this.cancelTimeout(); if (!this.activate()) { var W = this; setTimeout(function() { W.loaded(); }, 100); }};mbox.prototype.activate = function() { if (this.Bb) { return this.Bb; } this.setEventTime('activate' + ++this.Fb + '.start'); if (this.show()) { this.cancelTimeout(); this.Bb = 1; } this.setEventTime('activate' + this.Fb + '.end'); return this.Bb;};mbox.prototype.isActivated = function() { return this.Bb;};mbox.prototype.setOffer = function(Db) { if (Db && Db.show && Db.setOnLoad) { this.Db = Db; } else { throw 'Invalid offer'; } return this;};mbox.prototype.getOffer = function() { return this.Db;};mbox.prototype.show = function() { this.setEventTime('show.start'); var B = this.Db.show(this); this.setEventTime(B == 1 ? "show.end.ok" : "show.end"); return B;};mbox.prototype.showContent = function(Mb) { if (Mb == null) { return 0; } if (this.vb == null || !this.vb.parentNode) { this.vb = this.getDefaultDiv(); if (this.vb == null) { return 0; } } if (this.vb != Mb) { this.Nb(this.vb); this.vb.parentNode.replaceChild(Mb, this.vb); this.vb = Mb; } this.Ob(Mb); this.Ib(); return 1;};mbox.prototype.hide = function() { this.setEventTime('hide.start'); var B = this.showContent(this.getDefaultDiv()); this.setEventTime(B == 1 ? 'hide.end.ok' : 'hide.end.fail'); return B;};mbox.prototype.finalize = function() { this.setEventTime('finalize.start'); this.cancelTimeout(); if (this.getDefaultDiv() == null) { if (this.hb.force() != null) { this.setMessage('No default content, an empty one has been added'); } else { this.setMessage('Unable to locate mbox'); } } if (!this.activate()) { this.hide(); this.setEventTime('finalize.end.hide'); } this.setEventTime('finalize.end.ok');};mbox.prototype.cancelTimeout = function() { if (this.Lb) { clearTimeout(this.Lb); } if (this.Cb != null) { this.Cb.cancel(); }};mbox.prototype.getDiv = function() { return this.vb;};mbox.prototype.getDefaultDiv = function() { if (this.Jb == null) { this.Jb = this.hb.locate(); } return this.Jb;};mbox.prototype.setEventTime = function(Pb) { this.Eb[Pb] = (new Date()).getTime();};mbox.prototype.getEventTimes = function() { return this.Eb;};mbox.prototype.getImportName = function() { return this.ib;};mbox.prototype.getURL = function() { return this.w.buildUrl();};mbox.prototype.getUrlBuilder = function() { return this.w;};mbox.prototype.Qb = function(vb) { return vb.style.display != 'none';};mbox.prototype.Ob = function(vb) { this.Rb(vb, true);};mbox.prototype.Nb = function(vb) { this.Rb(vb, false);};mbox.prototype.Rb = function(vb, Sb) { vb.style.visibility = Sb ? "visible" : "hidden"; vb.style.display = Sb ? "block" : "none";};mboxOfferContent = function() { this.Ib = function() {};};mboxOfferContent.prototype.show = function(X) { var B = X.showContent(document.getElementById(X.getImportName())); if (B == 1) { this.Ib(); } return B;};mboxOfferContent.prototype.setOnLoad = function(Ib) { this.Ib = Ib;};mboxOfferAjax = function(Mb) { this.Mb = Mb; this.Ib = function() {};};mboxOfferAjax.prototype.setOnLoad = function(Ib) { this.Ib = Ib;};mboxOfferAjax.prototype.show = function(X) { var Tb = document.createElement('div'); Tb.id = X.getImportName(); Tb.innerHTML = this.Mb; var B = X.showContent(Tb); if (B == 1) { this.Ib(); } return B;};mboxOfferDefault = function() { this.Ib = function() {};};mboxOfferDefault.prototype.setOnLoad = function(Ib) { this.Ib = Ib;};mboxOfferDefault.prototype.show = function(X) { var B = X.hide(); if (B == 1) { this.Ib(); } return B;};mboxCookieManager = function mboxCookieManager(g, Ub) { this.g = g; this.Ub = Ub == '' || Ub.indexOf('.') == -1 ? '' : '; domain=' + Ub; this.Vb = new mboxMap(); this.loadCookies();};mboxCookieManager.prototype.isEnabled = function() { this.setCookie('check', 'true', 60); this.loadCookies(); return this.getCookie('check') == 'true';};mboxCookieManager.prototype.setCookie = function(g, h, ab) { if (typeof g != 'undefined' && typeof h != 'undefined' && typeof ab != 'undefined') { var Wb = new Object(); Wb.name = g; Wb.value = escape(h); Wb.expireOn = Math.ceil(ab + new Date().getTime() / 1000); this.Vb.put(g, Wb); this.saveCookies(); }};mboxCookieManager.prototype.getCookie = function(g) { var Wb = this.Vb.get(g); return Wb ? unescape(Wb.value) : null;};mboxCookieManager.prototype.deleteCookie = function(g) { this.Vb.remove(g); this.saveCookies();};mboxCookieManager.prototype.getCookieNames = function(Xb) { var Yb = new Array(); this.Vb.each(function(g, Wb) { if (g.indexOf(Xb) == 0) { Yb[Yb.length] = g; } }); return Yb;};mboxCookieManager.prototype.saveCookies = function() { var Zb = new Array(); var _b = 0; this.Vb.each(function(g, Wb) { Zb[Zb.length] = g + '#' + Wb.value + '#' + Wb.expireOn; if (_b < Wb.expireOn) { _b = Wb.expireOn; } }); var ac = new Date(_b * 1000); document.cookie = this.g + '=' + Zb.join('|') + '; expires=' + ac.toGMTString() + '; path=/' + this.Ub;};mboxCookieManager.prototype.loadCookies = function() { this.Vb = new mboxMap(); var bc = document.cookie.indexOf(this.g + '='); if (bc != -1) { var cc = document.cookie.indexOf(';', bc); if (cc == -1) { cc = document.cookie.indexOf(',', bc); if (cc == -1) { cc = document.cookie.length; } } var dc = document.cookie.substring( bc + this.g.length + 1, cc).split('|'); var ec = Math.ceil(new Date().getTime() / 1000); for (var j = 0; j < dc.length; j++) { var Wb = dc[j].split('#'); if (ec <= Wb[2]) { var fc = new Object(); fc.name = Wb[0]; fc.value = Wb[1]; fc.expireOn = Wb[2]; this.Vb.put(fc.name, fc); } } }};mboxSession = function(gc, hc, qb, ic, J) { this.hc = hc; this.qb = qb; this.ic = ic; this.J = J; this.jc = false; this.yb = typeof mboxForceSessionId != 'undefined' ? mboxForceSessionId : mboxGetPageParameter(this.hc); if (this.yb == null || this.yb.length == 0) { this.yb = J.getCookie(qb); if (this.yb == null || this.yb.length == 0) { this.yb = gc; this.jc = true; } } J.setCookie(qb, this.yb, ic);};mboxSession.prototype.getId = function() { return this.yb;};mboxSession.prototype.forceId = function(kc) { this.yb = kc; this.J.setCookie(this.qb, this.yb, this.ic);};mboxPC = function(qb, ic, J) { this.qb = qb; this.ic = ic; this.J = J; this.yb = typeof mboxForcePCId != 'undefined' ? mboxForcePCId : J.getCookie(qb); if (this.yb != null) { J.setCookie(qb, this.yb, ic); }};mboxPC.prototype.getId = function() { return this.yb;};mboxPC.prototype.forceId = function(kc) { if (this.yb != kc) { this.yb = kc; this.J.setCookie(this.qb, this.yb, this.ic); return true; } return false;};mboxGetPageParameter = function(g) { var B = null; var lc = new RegExp(g + "=([^\&]*)"); var mc = lc.exec(document.location); if (mc != null && mc.length >= 2) { B = mc[1]; } return B;};mboxSetCookie = function(g, h, ab) { return mboxFactoryDefault.getCookieManager().setCookie(g, h, ab);};mboxGetCookie = function(g) { return mboxFactoryDefault.getCookieManager().getCookie(g);};mboxCookiePageDomain = function() { var Ub = (/([^:]*)(:[0-9]{0,5})?/).exec(document.location.host)[1]; var nc = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/; if (!nc.exec(Ub)) { var oc = (/([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/).exec(Ub); if (oc) { Ub = oc[0]; } } return Ub ? Ub: "";};mboxShiftArray = function(pc) { var B = new Array(); for (var j = 1; j < pc.length; j++) { B[B.length] = pc[j]; } return B;};mboxGenerateId = function() { return (new Date()).getTime() + "-" + Math.floor(Math.random() * 999999);};mboxScreenHeight = function() { return screen.height;};mboxScreenWidth = function() { return screen.width;};mboxBrowserWidth = function() { return (window.innerWidth) ? window.innerWidth : document.documentElement ? document.documentElement.clientWidth : document.body.clientWidth;};mboxBrowserHeight = function() { return (window.innerHeight) ? window.innerHeight : document.documentElement ? document.documentElement.clientHeight : document.body.clientHeight;};mboxBrowserTimeOffset = function() { return -new Date().getTimezoneOffset();};mboxScreenColorDepth = function() { return screen.pixelDepth;};mboxDomReady = { DOMContentLoaded: null, isReady: false, readyBound: false, ready: function() { if (!mboxDomReady.isReady) { if (!document.body) { return setTimeout(mboxDomReady.ready, 13); } mboxDomReady.isReady = true; mboxDomReady.readyFunction(); } }, readyFunction: function(){}, setup: function() { if (mboxDomReady.readyBound) { return; } mboxDomReady.readyBound = true; if (document.readyState === "complete") { return mboxDomReady.ready(); } if (document.addEventListener) { mboxDomReady.DOMContentLoaded = function() { document.removeEventListener("DOMContentLoaded", mboxDomReady.DOMContentLoaded, false); mboxDomReady.ready(); }; document.addEventListener("DOMContentLoaded", mboxDomReady.DOMContentLoaded, false); window.addEventListener("load", mboxDomReady.ready, false); } else if (document.attachEvent) { DOMContentLoaded = function() { if (document.readyState === "complete") { document.detachEvent("onreadystatechange", mboxDomReady.DOMContentLoaded); mboxDomReady.ready(); } }; document.attachEvent("onreadystatechange", DOMContentLoaded); window.attachEvent("onload", mboxDomReady.ready); var toplevel = false; try { toplevel = (window.frameElement == null); } catch(e) {} if (document.documentElement.doScroll && toplevel) { mboxDomReady.doScrollCheck(); } } }, doScrollCheck: function() { if (mboxDomReady.isReady) { return; } try { document.documentElement.doScroll("left"); } catch( error ) { setTimeout(mboxDomReady.doScrollCheck, 1); return; } mboxDomReady.ready(); }};if (typeof mboxVersion == 'undefined') { var mboxVersion = 39; var mboxFactories = new mboxMap(); var mboxFactoryDefault = new mboxFactory('privalia.tt.omtrdc.net', 'privalia', 'default'); mboxDomReady.readyFunction = function(){mboxFactoryDefault.E=true;}; mboxDomReady.setup();};if (mboxGetPageParameter("mboxDebug") != null || mboxFactoryDefault.getCookieManager() .getCookie("debug") != null) { setTimeout(function() { if (typeof mboxDebugLoaded == 'undefined') { alert('Could not load the remote debug.\nPlease check your connection' + ' to Test&amp;Target servers'); } }, 60*60); document.write('<' + 'scr' + 'ipt language="Javascript1.2" src=' + '"http://admin5.testandtarget.omniture.com/admin/mbox/mbox_debug.jsp?mboxServerHost=privalia.tt.omtrdc.net' + '&clientCode=privalia"><' + '\/scr' + 'ipt>');};mboxScPluginFetcher = function(b, qc) { this.b = b; this.qc = qc;};mboxScPluginFetcher.prototype.rc = function(w) { w.setBasePath('/m2/' + this.b + '/sc/standard'); this.sc(w); var e = w.buildUrl(); e += '&scPluginVersion=1'; return e;};mboxScPluginFetcher.prototype.sc = function(w) { var tc = [ "dynamicVariablePrefix","visitorID","vmk","ppu","charSet", "visitorNamespace","cookieDomainPeriods","cookieLifetime","pageName", "currencyCode","variableProvider","channel","server", "pageType","transactionID","purchaseID","campaign","state","zip","events", "products","linkName","linkType","resolution","colorDepth", "javascriptVersion","javaEnabled","cookiesEnabled","browserWidth", "browserHeight","connectionType","homepage","pe","pev1","pev2","pev3", "visitorSampling","visitorSamplingGroup","dynamicAccountSelection", "dynamicAccountList","dynamicAccountMatch","trackDownloadLinks", "trackExternalLinks","trackInlineStats","linkLeaveQueryString", "linkDownloadFileTypes","linkExternalFilters","linkInternalFilters", "linkTrackVars","linkTrackEvents","linkNames","lnk","eo" ]; for (var j = 0; j < tc.length; j++) { this.uc(tc[j], w); } for (var j = 1; j <= 50; j++) { this.uc('prop' + j, w); this.uc('eVar' + j, w); this.uc('hier' + j, w); }};mboxScPluginFetcher.prototype.uc = function(g, w) { var h = this.qc[g]; if (typeof(h) === 'undefined' || h === null || h === '') { return; } w.addParameter(g, h);};mboxScPluginFetcher.prototype.cancel = function() { };mboxStandardScPluginFetcher = function(b, qc) { mboxScPluginFetcher.call(this, b, qc);};mboxStandardScPluginFetcher.prototype = new mboxScPluginFetcher;mboxStandardScPluginFetcher.prototype.getType = function() { return 'standard';};mboxStandardScPluginFetcher.prototype.fetch = function(w) { w.setServerType(this.getType()); var e = this.rc(w); document.write('<' + 'scr' + 'ipt src="' + e + '" language="JavaScript"><' + '\/scr' + 'ipt>');};mboxAjaxScPluginFetcher = function(b, qc) { mboxScPluginFetcher.call(this, b, qc);};mboxAjaxScPluginFetcher.prototype = new mboxScPluginFetcher;mboxAjaxScPluginFetcher.prototype.fetch = function(w) { w.setServerType(this.getType()); var e = this.rc(w); this.x = document.createElement('script'); this.x.src = e; document.body.appendChild(this.x);};mboxAjaxScPluginFetcher.prototype.getType = function() { return 'ajax';};function mboxLoadSCPlugin(qc) { if (!qc) { return null; } qc.m_tt = function(qc) { var vc = qc.m_i('tt'); vc.H = true; vc.b = 'privalia'; vc['_t'] = function() { if (!this.isEnabled()) { return; } var X = this.xc(); if (X) { var Kb = mboxFactoryDefault.isDomLoaded() ? new mboxAjaxScPluginFetcher(this.b, this.s) : new mboxStandardScPluginFetcher(this.b, this.s); X.setFetcher(Kb); X.load(); } }; vc.isEnabled = function() { return this.H && mboxFactoryDefault.isEnabled(); }; vc.xc = function() { var _ = this.yc(); var vb = document.createElement('DIV'); return mboxFactoryDefault.create(_, new Array(), vb); }; vc.yc = function() { var zc = this.s.events && this.s.events.indexOf('purchase') != -1; return 'SiteCatalyst: ' + (zc ? 'purchase' : 'event'); }; }; return qc.loadModule('tt');};/*
 * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
 * Digest Algorithm, as defined in RFC 1321.
 * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
 * Distributed under the BSD License
 * See http://pajhome.org.uk/crypt/md5 for more info.
 */

/*
 * Configurable variables. You may need to tweak these to be compatible with
 * the server-side, but the defaults work in most cases.
 */
var hexcase = 0;  /* hex output format. 0 - lowercase; 1 - uppercase        */
var b64pad  = ""; /* base-64 pad character. "=" for strict RFC compliance   */
var chrsz   = 8;  /* bits per input character. 8 - ASCII; 16 - Unicode      */

/*
 * These are the functions you'll usually want to call
 * They take string arguments and return either hex or base-64 encoded strings
 */
function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));}
function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));}
function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));}
function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); }
function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); }
function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); }

/*
 * Perform a simple self-test to see if the VM is working
 */
function md5_vm_test()
{
  return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
}

/*
 * Calculate the MD5 of an array of little-endian words, and a bit length
 */
function core_md5(x, len)
{
  /* append padding */
  x[len >> 5] |= 0x80 << ((len) % 32);
  x[(((len + 64) >>> 9) << 4) + 14] = len;

  var a =  1732584193;
  var b = -271733879;
  var c = -1732584194;
  var d =  271733878;

  for(var i = 0; i < x.length; i += 16)
  {
    var olda = a;
    var oldb = b;
    var oldc = c;
    var oldd = d;

    a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
    d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
    c = md5_ff(c, d, a, b, x[i+ 2], 17,  606105819);
    b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
    a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
    d = md5_ff(d, a, b, c, x[i+ 5], 12,  1200080426);
    c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
    b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
    a = md5_ff(a, b, c, d, x[i+ 8], 7 ,  1770035416);
    d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
    c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
    b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
    a = md5_ff(a, b, c, d, x[i+12], 7 ,  1804603682);
    d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
    c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
    b = md5_ff(b, c, d, a, x[i+15], 22,  1236535329);

    a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
    d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
    c = md5_gg(c, d, a, b, x[i+11], 14,  643717713);
    b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
    a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
    d = md5_gg(d, a, b, c, x[i+10], 9 ,  38016083);
    c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
    b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
    a = md5_gg(a, b, c, d, x[i+ 9], 5 ,  568446438);
    d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
    c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
    b = md5_gg(b, c, d, a, x[i+ 8], 20,  1163531501);
    a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
    d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
    c = md5_gg(c, d, a, b, x[i+ 7], 14,  1735328473);
    b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);

    a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
    d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
    c = md5_hh(c, d, a, b, x[i+11], 16,  1839030562);
    b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
    a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
    d = md5_hh(d, a, b, c, x[i+ 4], 11,  1272893353);
    c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
    b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
    a = md5_hh(a, b, c, d, x[i+13], 4 ,  681279174);
    d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
    c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
    b = md5_hh(b, c, d, a, x[i+ 6], 23,  76029189);
    a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
    d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
    c = md5_hh(c, d, a, b, x[i+15], 16,  530742520);
    b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);

    a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
    d = md5_ii(d, a, b, c, x[i+ 7], 10,  1126891415);
    c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
    b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
    a = md5_ii(a, b, c, d, x[i+12], 6 ,  1700485571);
    d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
    c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
    b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
    a = md5_ii(a, b, c, d, x[i+ 8], 6 ,  1873313359);
    d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
    c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
    b = md5_ii(b, c, d, a, x[i+13], 21,  1309151649);
    a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
    d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
    c = md5_ii(c, d, a, b, x[i+ 2], 15,  718787259);
    b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);

    a = safe_add(a, olda);
    b = safe_add(b, oldb);
    c = safe_add(c, oldc);
    d = safe_add(d, oldd);
  }
  return Array(a, b, c, d);

}

/*
 * These functions implement the four basic operations the algorithm uses.
 */
function md5_cmn(q, a, b, x, s, t)
{
  return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
}
function md5_ff(a, b, c, d, x, s, t)
{
  return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
}
function md5_gg(a, b, c, d, x, s, t)
{
  return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
}
function md5_hh(a, b, c, d, x, s, t)
{
  return md5_cmn(b ^ c ^ d, a, b, x, s, t);
}
function md5_ii(a, b, c, d, x, s, t)
{
  return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
}

/*
 * Calculate the HMAC-MD5, of a key and some data
 */
function core_hmac_md5(key, data)
{
  var bkey = str2binl(key);
  if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz);

  var ipad = Array(16), opad = Array(16);
  for(var i = 0; i < 16; i++)
  {
    ipad[i] = bkey[i] ^ 0x36363636;
    opad[i] = bkey[i] ^ 0x5C5C5C5C;
  }

  var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);
  return core_md5(opad.concat(hash), 512 + 128);
}

/*
 * Add integers, wrapping at 2^32. This uses 16-bit operations internally
 * to work around bugs in some JS interpreters.
 */
function safe_add(x, y)
{
  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
  return (msw << 16) | (lsw & 0xFFFF);
}

/*
 * Bitwise rotate a 32-bit number to the left.
 */
function bit_rol(num, cnt)
{
  return (num << cnt) | (num >>> (32 - cnt));
}

/*
 * Convert a string to an array of little-endian words
 * If chrsz is ASCII, characters >255 have their hi-byte silently ignored.
 */
function str2binl(str)
{
  var bin = Array();
  var mask = (1 << chrsz) - 1;
  for(var i = 0; i < str.length * chrsz; i += chrsz)
    bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32);
  return bin;
}

/*
 * Convert an array of little-endian words to a string
 */
function binl2str(bin)
{
  var str = "";
  var mask = (1 << chrsz) - 1;
  for(var i = 0; i < bin.length * 32; i += chrsz)
    str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask);
  return str;
}

/*
 * Convert an array of little-endian words to a hex string.
 */
function binl2hex(binarray)
{
  var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
  var str = "";
  for(var i = 0; i < binarray.length * 4; i++)
  {
    str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +
           hex_tab.charAt((binarray[i>>2] >> ((i%4)*8  )) & 0xF);
  }
  return str;
}

/*
 * Convert an array of little-endian words to a base-64 string
 */
function binl2b64(binarray)
{
  var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  var str = "";
  for(var i = 0; i < binarray.length * 4; i += 3)
  {
    var triplet = (((binarray[i   >> 2] >> 8 * ( i   %4)) & 0xFF) << 16)
                | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 )
                |  ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF);
    for(var j = 0; j < 4; j++)
    {
      if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
      else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
    }
  }
  return str;
}
/**
 *  omniture.js
 * =========================================
 * @requieres: 	--
 * @revision: 	1.1
 */

/**
 * Omniture - Common
 * =========================================
 * @modified: 	Marcos (6-07-11)
 */
var Omniture = new Class.create({
    initialize: function() {
    	this.version =			1.2;
    	this.bDebug =			true;
    	this.bResetAfterSend =	true;		// resetear valores guardados tras el envio a omniture

    	this.sIdCampaign =		'';			// Campaign PK
    	this.s =				null;		// objeto de Omniture. se instancia en setup()
    	this._aEvents =			[];			// valores que se enviaran en s.events
    	this._aLinkTrackEvents =[];			// valores que se enviaran en s.linkTrackEvents
    	this._aLinkTrackVars =	[];			// valores que se enviaran en s.linkTrackVars
    	this._aProducts =		[];			// valores que se enviaran en s.products
    	
    	
    	// por defecto siempre se envia event27: pagina vista
    	this.setEvent('event27');
    },
    
    /**
	 *  Metodo para determinar pais y su respectivo perfil de tracking. La cuenta para desarrollo es "privdev"
	 */
	getAccount: function() {
		// nombre de la cuenta a la que se enviaran los datos
		var sAccount =	"privdev",
		sCountry = '';
		
		if(typeof(Country) != 'undefined') {
			sCountry = Country.getIso();
		}
		
		if(sCountry !== "" && !this.bDebug) {
			switch (sCountry) {
				case 'es':
					sAccount = "privspain";
					break;
				case 'it':
					sAccount = "privitaly";
					break;
				case 'br':
					sAccount = "privbrazil";
					break;
				case 'mex':
					sAccount = "privmexico";
					break;
			}
		}
		
		return sAccount;
	},
    
	/**
	 * Recupera el Channel de Omniture, entendido como la seccion en la que se encuentra
	 * el usuario
	 */
	getChannel: function () {
		var sChannel = '',
		aPublicPages = ["technicalissuespub", "security", "whatweoffer", "indexpub", "workwithus", "register" , "about"],
		aResultUrl = document.location.href.split("/"),	// Recogemos la url de la seccion y pagina
		sSection = aResultUrl[3],
		sPage =	aResultUrl[4];

		if(aPublicPages.indexOf(sPage) !== -1) {
			if (sSection == 'help') {
				sChannel = "public/" + sSection;
			} else {
				sChannel = "public/" + sPage;
			}
		} else if(sSection == 'public' || sSection == '') {
			sChannel = "public/index";
		} else {
			if (sSection == 'microsites') {
				sChannel = "private/" + sPage;
			} else {
				sChannel = "private/" + sSection;
			}
		}
        
		return sChannel;
	},
	
	/**
	 * Conjunto de eventos agregados y concatenados por coma
	 */
	getEvents: function () {
		var sEvents = '';
		
		if(this._aEvents.size() > 0) {
			sEvents = this._aEvents.join(',');
		}
		
		return sEvents;
	},
	
	/**
	 * Devuelve el id campanya a partir de la URL. 
	 * guarda el valor en memoria para posteriores usos
	 */
	getIdCampaign: function () {
		var sPath = window.location.pathname,
		bIsSummary = (sPath.indexOf("summary") > -1) ? true : false ; 
		if(this.sIdCampaign === '') {
			if (!bIsSummary){
			this.sIdCampaign = PRV.Url.getUrlParamValue('campaign');
			}
		}
		
		return parseInt(this.sIdCampaign);
	},
	
	/**
	 * valores para s.internalfilters segun pais
	 * esa variable define que enlaces pertenecen en el sitio web, y poder
	 * distinguir que links son externos
	 */
	getInternalFilters: function () {
		var sCountry = Country.getIso(),
		sFilters = '';
		
		if(this.bDebug) {
			switch (sCountry) {
				case 'es':
					// nombre de la cuenta a la que se enviaran los datos
					sFilters = ",es.privalia.loc,es.secure.privalia.loc";
					break;
				case 'it':
					sFilters = ",it.privalia.com,it.secure.privalia.com";
					break;
				case 'br':
					sFilters = ",br.privalia.com,br.secure.privalia.com";
					break;
				case 'mex':
					sFilters = ",mex.privalia.com,mex.secure.privalia.com";
					break;
			}
		} else {
			switch (sCountry){
			case 'es':
				sFilters = ",es.privalia.com,es.secure.privalia.com";
				break;
			case 'it':
				sFilters = ",it.privalia.com,it.secure.privalia.com";
				break;
			case 'br':
				sFilters = ",br.privalia.com,br.secure.privalia.com";
				break;
			case 'mex':
				sFilters = ",mex.privalia.com,mex.secure.privalia.com";
				break;
			}
		}
		
		return sFilters;
	},
	
	/**
	 * Devuelve la Id del Socio
	 */
	getIdSocio: function () {
		return parseInt(Cookies.get('session_timestamp').split(";")[1]);
	},
	
	/**
	 * Recupera el contenido del array de Links a Eventos, 
	 * devuelve los elementos separados por comas
	 */
	getLinkTrackEvents: function () {
		var sTrack = '';
		
		if(this._aLinkTrackEvents.size() > 0) {
			sTrack = this._aLinkTrackEvents.join(',');
		}
		
		return sTrack;
	},
	
	/**
	 * Recupera el contenido del array de Links a Variables
	 * devuelve los elementos separados por comas
	 */
	getLinkTrackVars: function () {
		var sTrack = '';
		
		if(this._aLinkTrackVars.size() > 0) {
			sTrack = this._aLinkTrackVars.join(',');
		}
		
		return sTrack;
	},
	
	/**
	 * Conjunto de valores agregados en products y concatenados por punto y coma
	 */
	getProducts: function () {
		var sProducts = '';
		
		if(this._aProducts.size() > 0) {
			sProducts = this._aProducts.join(';');
		}
		
		return sProducts;
	},
	
	/**
	 * Obtenemos el provider de la url
	 */
	getProvider: function(){
		return s.getValOnce (window.location.hash.split('=')[1],'cpgn_session',0);		
	},
	/**
	 * Recupera el valor de la variable serial
	 */
	getSerial: function () {
		var sTimeStamp = this.getTimestamp().toString(36),
		sIdSocio = this.getIdSocio().toString(36),
		sIdCampaign = this.getIdCampaign().toString(36),
		sCode = sTimeStamp + sIdSocio + sIdCampaign;
		return sCode;
	},
	
	/**
	 * Devuelve la variable Timestamp
	 */
	getTimestamp: function () {
		return parseInt(Cookies.get('session_timestamp_client').split(";")[1]);
	},
	
	/**
	 * Dado el valor de la vista actual, codificarlo para Omniture
	 */
	getViewCode: function (sValue) {
		var sCode = '';
		
		switch(sValue) {
			// vista imagenes grandes
			case 'firstView':
				sCode = 'L';
				break;
			// vista imagenes pequenos
			case 'thirdView':
				sCode = 'S';
				break;
			// vista imagenes medianos
			case 'secondView':
			default:
				sCode = 'M';
				break;
		}
		
		sCode = 'L' + sCode;
		return sCode;
	},
	
	/**
	 * Registra un evento sEvent, suministrando unos datos variables en oOptions
	 * @param {Object} sEvent
	 * @param {Object} oOptions
	 */
	registerEvent: function (sEvent, oOptions) {
		if(sEvent !== '') {
			if (this.s !== null) {
			sEvent = this.setVarsEvent(sEvent, oOptions);
			this.s.tl(true, 'o', sEvent);
			}
			if(this.bResetAfterSend) {
	    		this._aEvents.clear();
	    		this._aProducts.clear();
	    	}
		}
    },
    
    /**
     * Envia todos los datos recopilados a Omniture
     * se utiliza un metodo propio del objeto Omniture "s"
     */
    registerView: function (oVars) {
		this.setVars(oVars);
    	this.s.t();
    	
    	if(this.bResetAfterSend) {
    		this._aEvents.clear();
    		this._aProducts.clear();
    	}
    },
	
	/**
	 * Recopilacion de los datos que se van a enviar a omniture
	 * Le pasamos el json que obtenemos de la peticion ajax (webanalytics) y lo agrega al objeto s
	 */
	setVars: function (oJsonVars) {
		this.s.pageName = window.location.pathname;
		this.s.channel = this.getChannel();
		this.s.events = this.getEvents();
		this.s.campaign = this.getProvider();
		// Extiendo el objeto de Omniture con los props y evars que se pasa por json
		
		if(oJsonVars !== '') {
			this.s = Object.extend(this.s, oJsonVars);
		}
		//this.s.products = this.getProducts(); TODO: en principio no se usa
	},
	
	/**
	 * Agrega un evento simple al array de eventos
	 * @param {Object} sItem
	 */
    setEvent: function (sItem) {
    	this._set(sItem, this._aEvents);
    },

    /**
     * Agregar a la var s.events un array de valores
     * El conjunto de valores events se enviaran a omniture
     */
    setEvents: function (aEvents) {
    	this._multiset(aEvents, this._aEvents);
    },

    /**
     * Agregar a la var s.events un array de valores
     * El conjunto de valores events se enviaran a omniture
     */
    setLinkTrackEvents: function (aEvents) {
    	this._multiset(aEvents, this._aLinkTrackEvents);
    },
    
	/**
	 * Agrega a la variable _aLinkTrackVars el array de datos
	 * @param {Object} aVars
	 */
    setLinkTrackVars: function (aVars) {
    	this._multiset(aVars, this._aLinkTrackVars);
    },
    
	/**
	 * Agrega a la variable _aProducts el item
	 * @param {Object} sItem
	 */
    setProduct: function (sItem) {
    	this._set(sItem, this._aProducts);
    },

    /**
     * Agregar a la var s.products un array de valores
     * El conjunto de valores products se enviaran a omniture
     */
    setProducts: function (aValues) {
    	this._multiset(aValues, this._aProducts);
    },
    
    /**
     * Agregar una propiedad al objeto "s".
     * Equivale a s[sName] = sValue;
     * @param {String} sName Nombre de la propiedad
     * @param {String} sValue Valor de la propiedad
     */
    setProperty: function(sName, sValue) {
    	this.s[sName] = sValue;
    },
    
    /**
     * Agrega muchas propiedades a la vez al objeto s.
     * @param {Object} oProperties Objecto javascript con las propiedades a agregar.
     */
    setProperties: function(oProperties) {
    	for (var k in oProperties) {
    		this.s[k] = oProperties[k];
    	}
    },
    
    /**
	 * Setea los eventos correspondientes a cada seccion
	 * @param {Object} sEvent
	 * @param {Object} oOptions
     */
	setVarsEvent: function (sEvent, oOptions) {
		var sEvar9 = '';
		
		switch(sEvent) {
			// agregar un producto desde listado de producto
			case 'addToCartProductList':			//Fall Through
				// no nos interesa enviar el valor 'firstView', 'secondView', etc.
				// sino enviar 'LS' (imagen peque), 'LM' (img media) o 'LL' (img grande)
				sEvar9 = this.getViewCode(oOptions.eVar9);
				
			// agregar un producto desde la ficha de producto y los distintos carruseles
			case 'addToCartProductPage':
			case 'addToCartTooltipRC':
			case 'addToCartTooltipSC':
			case 'addToCartTooltipFC':
				var sEvar8 = 'disponible';
				
				if(oOptions.eVar8 !== '') {
					sEvar8 = oOptions.eVar8;
				}
				
				if(sEvar9 === '') {
					sEvar9 = oOptions.eVar9;
				}
				
				this.setLinkTrackVars(['products', 'events']);
				this.setLinkTrackEvents(['scCheckout', 'scAdd', 'event70']);
				this.setProducts([this.getIdCampaign(), oOptions.pkProduct, ';;', 'eVar8=' + sEvar8 + '|eVar9=' + sEvar9]);
				this.setEvents(['scCheckout','scAdd','event70:' + this.getSerial()]);
				break;
			case 'clickChat':
				this.setLinkTrackVars(['prop10', 'prop14', 'eVar34', 'events']);
				this.setLinkTrackEvents(['event84', 'event15']);
				var prop14 = 'clickChat';
				this.setProperties({
					prop10: window.location.pathname,
					prop14: prop14,
					eVar34: prop14
				});
				this.setEvents(['event84', 'event15']);
				break;
			case 'viewProductTooltip':
				var sEvar8 = oOptions.quantity,
				sEvar9 = oOptions.type,
				sEvent2 = '';
				if (sEvar9 == 'FC') {
					sEvent2 = 'event54';
				} else if (sEvar9 == 'SC') {
					sEvent2 = 'event55';
				} else {
					sEvent2 = 'event56';
				}
				this.setLinkTrackVars(['products', 'events']);
				this.setLinkTrackEvents(['event68', sEvent2]);
				this.setProducts([this.getIdCampaign(), oOptions.pkProduct, ';;', 'eVar8=' + sEvar8 + '|eVar9=' + sEvar9]);
				this.setEvents(['event68', sEvent2]);
				break;
			case 'ErrorJS':
				this.setLinkTrackVars(['prop10', 'prop11', 'eVar31', 'events']);
				var prop11 = 'ErrorJS/' + oOptions.errorName;
				this.setProperties({
					prop10: window.location.pathname,
					prop11: prop11,
					eVar31: prop11
				});
				this.setEvents(['event81']);
				break;
			case 'FormError':
				var sErrors = oOptions.fieldErrors,
				sForm = oOptions.form,
				sReport = 'Form/' + sForm + '/' + sErrors;
				this.setProperties({
					prop10: window.location.pathname,
					prop12: sReport,
					eVar32: sReport
				});
				this.setLinkTrackVars(['prop10', 'prop12', 'eVar32', 'events']);
				this.setLinkTrackEvents(['event82']);
				this.setEvents(['event82']);
				//Devolvemos el nombre del formulario erroneo
				sEvent = 'Form/' + sForm;
				break;
		}
		
		this.s.linkTrackVars = this.getLinkTrackVars();
		this.s.linkTrackEvents = this.getLinkTrackEvents();
		this.s.products = this.getProducts();
		this.s.events = this.getEvents();
		return sEvent;
	},
	
	/**
	 * Inicializa la configuracion Omniture
	 */
	init: function () {
		// se activa la cuenta segun el pais
		var sAccount = this.getAccount();
		var s = s_gi(sAccount);

		// No tocar el siguiente codigo, prepara los parametros dados para poder enviarlos
		var s_code='',s_objectID;function s_gi(un,pg,ss){var c="s._c='s_c';s.wd=window;if(!s.wd.s_c_in){s.wd.s_c_il=new Array;s.wd.s_c_in=0;}s._il=s.wd.s_c_il;s._in=s.wd.s_c_in;s._il[s._in]=s;s.wd.s_c_in++;s"
		+".an=s_an;s.cls=function(x,c){var i,y='';if(!c)c=this.an;for(i=0;i<x.length;i++){n=x.substring(i,i+1);if(c.indexOf(n)>=0)y+=n}return y};s.fl=function(x,l){return x?(''+x).substring(0,l):x};s.co=func"
		+"tion(o){if(!o)return o;var n=new Object,x;for(x in o)if(x.indexOf('select')<0&&x.indexOf('filter')<0)n[x]=o[x];return n};s.num=function(x){x=''+x;for(var p=0;p<x.length;p++)if(('0123456789').indexO"
		+"f(x.substring(p,p+1))<0)return 0;return 1};s.rep=s_rep;s.sp=s_sp;s.jn=s_jn;s.ape=function(x){var s=this,h='0123456789ABCDEF',i,c=s.charSet,n,l,e,y='';c=c?c.toUpperCase():'';if(x){x=''+x;if(c=='AUTO"
		+"'&&('').charCodeAt){for(i=0;i<x.length;i++){c=x.substring(i,i+1);n=x.charCodeAt(i);if(n>127){l=0;e='';while(n||l<4){e=h.substring(n%16,n%16+1)+e;n=(n-n%16)/16;l++}y+='%u'+e}else if(c=='+')y+='%2B';"
		+"else y+=escape(c)}x=y}else{x=x?s.rep(escape(''+x),'+','%2B'):x;if(x&&c&&s.em==1&&x.indexOf('%u')<0&&x.indexOf('%U')<0){i=x.indexOf('%');while(i>=0){i++;if(h.substring(8).indexOf(x.substring(i,i+1)."
		+"toUpperCase())>=0)return x.substring(0,i)+'u00'+x.substring(i);i=x.indexOf('%',i)}}}}return x};s.epa=function(x){var s=this;return x?unescape(s.rep(''+x,'+',' ')):x};s.pt=function(x,d,f,a){var s=th"
		+"is,t=x,z=0,y,r;while(t){y=t.indexOf(d);y=y<0?t.length:y;t=t.substring(0,y);r=s[f](t,a);if(r)return r;z+=y+d.length;t=x.substring(z,x.length);t=z<x.length?t:''}return ''};s.isf=function(t,a){var c=a"
		+".indexOf(':');if(c>=0)a=a.substring(0,c);if(t.substring(0,2)=='s_')t=t.substring(2);return (t!=''&&t==a)};s.fsf=function(t,a){var s=this;if(s.pt(a,',','isf',t))s.fsg+=(s.fsg!=''?',':'')+t;return 0}"
		+";s.fs=function(x,f){var s=this;s.fsg='';s.pt(x,',','fsf',f);return s.fsg};s.si=function(){var s=this,i,k,v,c=s_gi+'var s=s_gi(\"'+s.oun+'\");s.sa(\"'+s.un+'\");';for(i=0;i<s.va_g.length;i++){k=s.va"
		+"_g[i];v=s[k];if(v!=undefined){if(typeof(v)=='string')c+='s.'+k+'=\"'+s_fe(v)+'\";';else c+='s.'+k+'='+v+';'}}c+=\"s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3=''"
		+";\";return c};s.c_d='';s.c_gdf=function(t,a){var s=this;if(!s.num(t))return 1;return 0};s.c_gd=function(){var s=this,d=s.wd.location.hostname,n=s.fpCookieDomainPeriods,p;if(!n)n=s.cookieDomainPerio"
		+"ds;if(d&&!s.c_d){n=n?parseInt(n):2;n=n>2?n:2;p=d.lastIndexOf('.');if(p>=0){while(p>=0&&n>1){p=d.lastIndexOf('.',p-1);n--}s.c_d=p>0&&s.pt(d,'.','c_gdf',0)?d.substring(p):d}}return s.c_d};s.c_r=funct"
		+"ion(k){var s=this;k=s.ape(k);var c=' '+s.d.cookie,i=c.indexOf(' '+k+'='),e=i<0?i:c.indexOf(';',i),v=i<0?'':s.epa(c.substring(i+2+k.length,e<0?c.length:e));return v!='[[B]]'?v:''};s.c_w=function(k,v"
		+",e){var s=this,d=s.c_gd(),l=s.cookieLifetime,t;v=''+v;l=l?(''+l).toUpperCase():'';if(e&&l!='SESSION'&&l!='NONE'){t=(v!=''?parseInt(l?l:0):-60);if(t){e=new Date;e.setTime(e.getTime()+(t*1000))}}if(k"
		+"&&l!='NONE'){s.d.cookie=k+'='+s.ape(v!=''?v:'[[B]]')+'; path=/;'+(e&&l!='SESSION'?' expires='+e.toGMTString()+';':'')+(d?' domain='+d+';':'');return s.c_r(k)==v}return 0};s.eh=function(o,e,r,f){var"
		+" s=this,b='s_'+e+'_'+s._in,n=-1,l,i,x;if(!s.ehl)s.ehl=new Array;l=s.ehl;for(i=0;i<l.length&&n<0;i++){if(l[i].o==o&&l[i].e==e)n=i}if(n<0){n=i;l[n]=new Object}x=l[n];x.o=o;x.e=e;f=r?x.b:f;if(r||f){x."
		+"b=r?0:o[e];x.o[e]=f}if(x.b){x.o[b]=x.b;return b}return 0};s.cet=function(f,a,t,o,b){var s=this,r,tcf;if(s.apv>=5&&(!s.isopera||s.apv>=7)){tcf=new Function('s','f','a','t','var e,r;try{r=s[f](a)}cat"
		+"ch(e){r=s[t](e)}return r');r=tcf(s,f,a,t)}else{if(s.ismac&&s.u.indexOf('MSIE 4')>=0)r=s[b](a);else{s.eh(s.wd,'onerror',0,o);r=s[f](a);s.eh(s.wd,'onerror',1)}}return r};s.gtfset=function(e){var s=th"
		+"is;return s.tfs};s.gtfsoe=new Function('e','var s=s_c_il['+s._in+'],c;s.eh(window,\"onerror\",1);s.etfs=1;c=s.t();if(c)s.d.write(c);s.etfs=0;return true');s.gtfsfb=function(a){return window};s.gtfs"
		+"f=function(w){var s=this,p=w.parent,l=w.location;s.tfs=w;if(p&&p.location!=l&&p.location.host==l.host){s.tfs=p;return s.gtfsf(s.tfs)}return s.tfs};s.gtfs=function(){var s=this;if(!s.tfs){s.tfs=s.wd"
		+";if(!s.etfs)s.tfs=s.cet('gtfsf',s.tfs,'gtfset',s.gtfsoe,'gtfsfb')}return s.tfs};s.mrq=function(u){var s=this,l=s.rl[u],n,r;s.rl[u]=0;if(l)for(n=0;n<l.length;n++){r=l[n];s.mr(0,0,r.r,0,r.t,r.u)}};s."
		+"br=function(id,rs){var s=this;if(s.disableBufferedRequests||!s.c_w('s_br',rs))s.brl=rs};s.flushBufferedRequests=function(){this.fbr(0)};s.fbr=function(id){var s=this,br=s.c_r('s_br');if(!br)br=s.br"
		+"l;if(br){if(!s.disableBufferedRequests)s.c_w('s_br','');s.mr(0,0,br)}s.brl=0};s.mr=function(sess,q,rs,id,ta,u){var s=this,dc=s.dc,t1=s.trackingServer,t2=s.trackingServerSecure,tb=s.trackingServerBa"
		+"se,p='.sc',ns=s.visitorNamespace,un=s.cls(u?u:(ns?ns:s.fun)),r=new Object,l,imn='s_i_'+(un),im,b,e;if(!rs){if(t1){if(t2&&s.ssl)t1=t2}else{if(!tb)tb='2o7.net';if(dc)dc=(''+dc).toLowerCase();else dc="
		+"'d1';if(tb=='2o7.net'){if(dc=='d1')dc='112';else if(dc=='d2')dc='122';p=''}t1=un+'.'+dc+'.'+p+tb}rs='http'+(s.ssl?'s':'')+'://'+t1+'/b/ss/'+s.un+'/'+(s.mobile?'5.1':'1')+'/H.21/'+sess+'?AQB=1&ndh=1"
		+"'+(q?q:'')+'&AQE=1';if(s.isie&&!s.ismac){if(s.apv>5.5)rs=s.fl(rs,4095);else rs=s.fl(rs,2047)}if(id){s.br(id,rs);return}}if(s.d.images&&s.apv>=3&&(!s.isopera||s.apv>=7)&&(s.ns6<0||s.apv>=6.1)){if(!s"
		+".rc)s.rc=new Object;if(!s.rc[un]){s.rc[un]=1;if(!s.rl)s.rl=new Object;s.rl[un]=new Array;setTimeout('if(window.s_c_il)window.s_c_il['+s._in+'].mrq(\"'+un+'\")',750)}else{l=s.rl[un];if(l){r.t=ta;r.u"
		+"=un;r.r=rs;l[l.length]=r;return ''}imn+='_'+s.rc[un];s.rc[un]++}im=s.wd[imn];if(!im)im=s.wd[imn]=new Image;im.s_l=0;im.onload=new Function('e','this.s_l=1;var wd=window,s;if(wd.s_c_il){s=wd.s_c_il["
		+"'+s._in+'];s.mrq(\"'+un+'\");s.nrs--;if(!s.nrs)s.m_m(\"rr\")}');if(!s.nrs){s.nrs=1;s.m_m('rs')}else s.nrs++;im.src=rs;if(rs.indexOf('&pe=')>=0&&(!ta||ta=='_self'||ta=='_top'||(s.wd.name&&ta==s.wd.n"
		+"ame))){b=e=new Date;while(!im.s_l&&e.getTime()-b.getTime()<500)e=new Date}return ''}return '<im'+'g sr'+'c=\"'+rs+'\" width=1 height=1 border=0 alt=\"\">'};s.gg=function(v){var s=this;if(!s.wd['s_'"
		+"+v])s.wd['s_'+v]='';return s.wd['s_'+v]};s.glf=function(t,a){if(t.substring(0,2)=='s_')t=t.substring(2);var s=this,v=s.gg(t);if(v)s[t]=v};s.gl=function(v){var s=this;if(s.pg)s.pt(v,',','glf',0)};s."
		+"rf=function(x){var s=this,y,i,j,h,l,a,b='',c='',t;if(x){y=''+x;i=y.indexOf('?');if(i>0){a=y.substring(i+1);y=y.substring(0,i);h=y.toLowerCase();i=0;if(h.substring(0,7)=='http://')i+=7;else if(h.sub"
		+"string(0,8)=='https://')i+=8;h=h.substring(i);i=h.indexOf(\"/\");if(i>0){h=h.substring(0,i);if(h.indexOf('google')>=0){a=s.sp(a,'&');if(a.length>1){l=',q,ie,start,search_key,word,kw,cd,';for(j=0;j<"
		+"a.length;j++){t=a[j];i=t.indexOf('=');if(i>0&&l.indexOf(','+t.substring(0,i)+',')>=0)b+=(b?'&':'')+t;else c+=(c?'&':'')+t}if(b&&c){y+='?'+b+'&'+c;if(''+x!=y)x=y}}}}}}return x};s.hav=function(){var "
		+"s=this,qs='',fv=s.linkTrackVars,fe=s.linkTrackEvents,mn,i;if(s.pe){mn=s.pe.substring(0,1).toUpperCase()+s.pe.substring(1);if(s[mn]){fv=s[mn].trackVars;fe=s[mn].trackEvents}}fv=fv?fv+','+s.vl_l+','+"
		+"s.vl_l2:'';for(i=0;i<s.va_t.length;i++){var k=s.va_t[i],v=s[k],b=k.substring(0,4),x=k.substring(4),n=parseInt(x),q=k;if(v&&k!='linkName'&&k!='linkType'){if(s.pe||s.lnk||s.eo){if(fv&&(','+fv+',').in"
		+"dexOf(','+k+',')<0)v='';if(k=='events'&&fe)v=s.fs(v,fe)}if(v){if(k=='dynamicVariablePrefix')q='D';else if(k=='visitorID')q='vid';else if(k=='pageURL'){q='g';v=s.fl(v,255)}else if(k=='referrer'){q='"
		+"r';v=s.fl(s.rf(v),255)}else if(k=='vmk'||k=='visitorMigrationKey')q='vmt';else if(k=='visitorMigrationServer'){q='vmf';if(s.ssl&&s.visitorMigrationServerSecure)v=''}else if(k=='visitorMigrationServ"
		+"erSecure'){q='vmf';if(!s.ssl&&s.visitorMigrationServer)v=''}else if(k=='charSet'){q='ce';if(v.toUpperCase()=='AUTO')v='ISO8859-1';else if(s.em==2)v='UTF-8'}else if(k=='visitorNamespace')q='ns';else"
		+" if(k=='cookieDomainPeriods')q='cdp';else if(k=='cookieLifetime')q='cl';else if(k=='variableProvider')q='vvp';else if(k=='currencyCode')q='cc';else if(k=='channel')q='ch';else if(k=='transactionID'"
		+")q='xact';else if(k=='campaign')q='v0';else if(k=='resolution')q='s';else if(k=='colorDepth')q='c';else if(k=='javascriptVersion')q='j';else if(k=='javaEnabled')q='v';else if(k=='cookiesEnabled')q="
		+"'k';else if(k=='browserWidth')q='bw';else if(k=='browserHeight')q='bh';else if(k=='connectionType')q='ct';else if(k=='homepage')q='hp';else if(k=='plugins')q='p';else if(s.num(x)){if(b=='prop')q='c"
		+"'+n;else if(b=='eVar')q='v'+n;else if(b=='list')q='l'+n;else if(b=='hier'){q='h'+n;v=s.fl(v,255)}}if(v)qs+='&'+q+'='+(k.substring(0,3)!='pev'?s.ape(v):v)}}}return qs};s.ltdf=function(t,h){t=t?t.toL"
		+"owerCase():'';h=h?h.toLowerCase():'';var qi=h.indexOf('?');h=qi>=0?h.substring(0,qi):h;if(t&&h.substring(h.length-(t.length+1))=='.'+t)return 1;return 0};s.ltef=function(t,h){t=t?t.toLowerCase():''"
		+";h=h?h.toLowerCase():'';if(t&&h.indexOf(t)>=0)return 1;return 0};s.lt=function(h){var s=this,lft=s.linkDownloadFileTypes,lef=s.linkExternalFilters,lif=s.linkInternalFilters;lif=lif?lif:s.wd.locatio"
		+"n.hostname;h=h.toLowerCase();if(s.trackDownloadLinks&&lft&&s.pt(lft,',','ltdf',h))return 'd';if(s.trackExternalLinks&&h.substring(0,1)!='#'&&(lef||lif)&&(!lef||s.pt(lef,',','ltef',h))&&(!lif||!s.pt"
		+"(lif,',','ltef',h)))return 'e';return ''};s.lc=new Function('e','var s=s_c_il['+s._in+'],b=s.eh(this,\"onclick\");s.lnk=s.co(this);s.t();s.lnk=0;if(b)return this[b](e);return true');s.bc=new Functi"
		+"on('e','var s=s_c_il['+s._in+'],f,tcf;if(s.d&&s.d.all&&s.d.all.cppXYctnr)return;s.eo=e.srcElement?e.srcElement:e.target;tcf=new Function(\"s\",\"var e;try{if(s.eo&&(s.eo.tagName||s.eo.parentElement"
		+"||s.eo.parentNode))s.t()}catch(e){}\");tcf(s);s.eo=0');s.oh=function(o){var s=this,l=s.wd.location,h=o.href?o.href:'',i,j,k,p;i=h.indexOf(':');j=h.indexOf('?');k=h.indexOf('/');if(h&&(i<0||(j>=0&&i"
		+">j)||(k>=0&&i>k))){p=o.protocol&&o.protocol.length>1?o.protocol:(l.protocol?l.protocol:'');i=l.pathname.lastIndexOf('/');h=(p?p+'//':'')+(o.host?o.host:(l.host?l.host:''))+(h.substring(0,1)!='/'?l."
		+"pathname.substring(0,i<0?0:i)+'/':'')+h}return h};s.ot=function(o){var t=o.tagName;t=t&&t.toUpperCase?t.toUpperCase():'';if(t=='SHAPE')t='';if(t){if((t=='INPUT'||t=='BUTTON')&&o.type&&o.type.toUppe"
		+"rCase)t=o.type.toUpperCase();else if(!t&&o.href)t='A';}return t};s.oid=function(o){var s=this,t=s.ot(o),p,c,n='',x=0;if(t&&!o.s_oid){p=o.protocol;c=o.onclick;if(o.href&&(t=='A'||t=='AREA')&&(!c||!p"
		+"||p.toLowerCase().indexOf('javascript')<0))n=s.oh(o);else if(c){n=s.rep(s.rep(s.rep(s.rep(''+c,\"\\r\",''),\"\\n\",''),\"\\t\",''),' ','');x=2}else if(t=='INPUT'||t=='SUBMIT'){if(o.value)n=o.value;"
		+"else if(o.innerText)n=o.innerText;else if(o.textContent)n=o.textContent;x=3}else if(o.src&&t=='IMAGE')n=o.src;if(n){o.s_oid=s.fl(n,100);o.s_oidt=x}}return o.s_oid};s.rqf=function(t,un){var s=this,e"
		+"=t.indexOf('='),u=e>=0?','+t.substring(0,e)+',':'';return u&&u.indexOf(','+un+',')>=0?s.epa(t.substring(e+1)):''};s.rq=function(un){var s=this,c=un.indexOf(','),v=s.c_r('s_sq'),q='';if(c<0)return s"
		+".pt(v,'&','rqf',un);return s.pt(un,',','rq',0)};s.sqp=function(t,a){var s=this,e=t.indexOf('='),q=e<0?'':s.epa(t.substring(e+1));s.sqq[q]='';if(e>=0)s.pt(t.substring(0,e),',','sqs',q);return 0};s.s"
		+"qs=function(un,q){var s=this;s.squ[un]=q;return 0};s.sq=function(q){var s=this,k='s_sq',v=s.c_r(k),x,c=0;s.sqq=new Object;s.squ=new Object;s.sqq[q]='';s.pt(v,'&','sqp',0);s.pt(s.un,',','sqs',q);v='"
		+"';for(x in s.squ)if(x&&(!Object||!Object.prototype||!Object.prototype[x]))s.sqq[s.squ[x]]+=(s.sqq[s.squ[x]]?',':'')+x;for(x in s.sqq)if(x&&(!Object||!Object.prototype||!Object.prototype[x])&&s.sqq["
		+"x]&&(x==q||c<2)){v+=(v?'&':'')+s.sqq[x]+'='+s.ape(x);c++}return s.c_w(k,v,0)};s.wdl=new Function('e','var s=s_c_il['+s._in+'],r=true,b=s.eh(s.wd,\"onload\"),i,o,oc;if(b)r=this[b](e);for(i=0;i<s.d.l"
		+"inks.length;i++){o=s.d.links[i];oc=o.onclick?\"\"+o.onclick:\"\";if((oc.indexOf(\"s_gs(\")<0||oc.indexOf(\".s_oc(\")>=0)&&oc.indexOf(\".tl(\")<0)s.eh(o,\"onclick\",0,s.lc);}return r');s.wds=functio"
		+"n(){var s=this;if(s.apv>3&&(!s.isie||!s.ismac||s.apv>=5)){if(s.b&&s.b.attachEvent)s.b.attachEvent('onclick',s.bc);else if(s.b&&s.b.addEventListener)s.b.addEventListener('click',s.bc,false);else s.e"
		+"h(s.wd,'onload',0,s.wdl)}};s.vs=function(x){var s=this,v=s.visitorSampling,g=s.visitorSamplingGroup,k='s_vsn_'+s.un+(g?'_'+g:''),n=s.c_r(k),e=new Date,y=e.getYear();e.setYear(y+10+(y<1900?1900:0));"
		+"if(v){v*=100;if(!n){if(!s.c_w(k,x,e))return 0;n=x}if(n%10000>v)return 0}return 1};s.dyasmf=function(t,m){if(t&&m&&m.indexOf(t)>=0)return 1;return 0};s.dyasf=function(t,m){var s=this,i=t?t.indexOf('"
		+"='):-1,n,x;if(i>=0&&m){var n=t.substring(0,i),x=t.substring(i+1);if(s.pt(x,',','dyasmf',m))return n}return 0};s.uns=function(){var s=this,x=s.dynamicAccountSelection,l=s.dynamicAccountList,m=s.dyna"
		+"micAccountMatch,n,i;s.un=s.un.toLowerCase();if(x&&l){if(!m)m=s.wd.location.host;if(!m.toLowerCase)m=''+m;l=l.toLowerCase();m=m.toLowerCase();n=s.pt(l,';','dyasf',m);if(n)s.un=n}i=s.un.indexOf(',');"
		+"s.fun=i<0?s.un:s.un.substring(0,i)};s.sa=function(un){var s=this;s.un=un;if(!s.oun)s.oun=un;else if((','+s.oun+',').indexOf(','+un+',')<0)s.oun+=','+un;s.uns()};s.m_i=function(n,a){var s=this,m,f=n"
		+".substring(0,1),r,l,i;if(!s.m_l)s.m_l=new Object;if(!s.m_nl)s.m_nl=new Array;m=s.m_l[n];if(!a&&m&&m._e&&!m._i)s.m_a(n);if(!m){m=new Object,m._c='s_m';m._in=s.wd.s_c_in;m._il=s._il;m._il[m._in]=m;s."
		+"wd.s_c_in++;m.s=s;m._n=n;m._l=new Array('_c','_in','_il','_i','_e','_d','_dl','s','n','_r','_g','_g1','_t','_t1','_x','_x1','_rs','_rr','_l');s.m_l[n]=m;s.m_nl[s.m_nl.length]=n}else if(m._r&&!m._m)"
		+"{r=m._r;r._m=m;l=m._l;for(i=0;i<l.length;i++)if(m[l[i]])r[l[i]]=m[l[i]];r._il[r._in]=r;m=s.m_l[n]=r}if(f==f.toUpperCase())s[n]=m;return m};s.m_a=new Function('n','g','e','if(!g)g=\"m_\"+n;var s=s_c"
		+"_il['+s._in+'],c=s[g+\"_c\"],m,x,f=0;if(!c)c=s.wd[\"s_\"+g+\"_c\"];if(c&&s_d)s[g]=new Function(\"s\",s_ft(s_d(c)));x=s[g];if(!x)x=s.wd[\\'s_\\'+g];if(!x)x=s.wd[g];m=s.m_i(n,1);if(x&&(!m._i||g!=\"m_"
		+"\"+n)){m._i=f=1;if((\"\"+x).indexOf(\"function\")>=0)x(s);else s.m_m(\"x\",n,x,e)}m=s.m_i(n,1);if(m._dl)m._dl=m._d=0;s.dlt();return f');s.m_m=function(t,n,d,e){t='_'+t;var s=this,i,x,m,f='_'+t,r=0,"
		+"u;if(s.m_l&&s.m_nl)for(i=0;i<s.m_nl.length;i++){x=s.m_nl[i];if(!n||x==n){m=s.m_i(x);u=m[t];if(u){if((''+u).indexOf('function')>=0){if(d&&e)u=m[t](d,e);else if(d)u=m[t](d);else u=m[t]()}}if(u)r=1;u="
		+"m[t+1];if(u&&!m[f]){if((''+u).indexOf('function')>=0){if(d&&e)u=m[t+1](d,e);else if(d)u=m[t+1](d);else u=m[t+1]()}}m[f]=1;if(u)r=1}}return r};s.m_ll=function(){var s=this,g=s.m_dl,i,o;if(g)for(i=0;"
		+"i<g.length;i++){o=g[i];if(o)s.loadModule(o.n,o.u,o.d,o.l,o.e,1);g[i]=0}};s.loadModule=function(n,u,d,l,e,ln){var s=this,m=0,i,g,o=0,f1,f2,c=s.h?s.h:s.b,b,tcf;if(n){i=n.indexOf(':');if(i>=0){g=n.sub"
		+"string(i+1);n=n.substring(0,i)}else g=\"m_\"+n;m=s.m_i(n)}if((l||(n&&!s.m_a(n,g)))&&u&&s.d&&c&&s.d.createElement){if(d){m._d=1;m._dl=1}if(ln){if(s.ssl)u=s.rep(u,'http:','https:');i='s_s:'+s._in+':'"
		+"+n+':'+g;b='var s=s_c_il['+s._in+'],o=s.d.getElementById(\"'+i+'\");if(s&&o){if(!o.l&&s.wd.'+g+'){o.l=1;if(o.i)clearTimeout(o.i);o.i=0;s.m_a(\"'+n+'\",\"'+g+'\"'+(e?',\"'+e+'\"':'')+')}';f2=b+'o.c+"
		+"+;if(!s.maxDelay)s.maxDelay=250;if(!o.l&&o.c<(s.maxDelay*2)/100)o.i=setTimeout(o.f2,100)}';f1=new Function('e',b+'}');tcf=new Function('s','c','i','u','f1','f2','var e,o=0;try{o=s.d.createElement("
		+"\"script\");if(o){o.type=\"text/javascript\";'+(n?'o.id=i;o.defer=true;o.onload=o.onreadystatechange=f1;o.f2=f2;o.l=0;':'')+'o.src=u;c.appendChild(o);'+(n?'o.c=0;o.i=setTimeout(f2,100)':'')+'}}catc"
		+"h(e){o=0}return o');o=tcf(s,c,i,u,f1,f2)}else{o=new Object;o.n=n+':'+g;o.u=u;o.d=d;o.l=l;o.e=e;g=s.m_dl;if(!g)g=s.m_dl=new Array;i=0;while(i<g.length&&g[i])i++;g[i]=o}}else if(n){m=s.m_i(n);m._e=1}"
		+"return m};s.vo1=function(t,a){if(a[t]||a['!'+t])this[t]=a[t]};s.vo2=function(t,a){if(!a[t]){a[t]=this[t];if(!a[t])a['!'+t]=1}};s.dlt=new Function('var s=s_c_il['+s._in+'],d=new Date,i,vo,f=0;if(s.d"
		+"ll)for(i=0;i<s.dll.length;i++){vo=s.dll[i];if(vo){if(!s.m_m(\"d\")||d.getTime()-vo._t>=s.maxDelay){s.dll[i]=0;s.t(vo)}else f=1}}if(s.dli)clearTimeout(s.dli);s.dli=0;if(f){if(!s.dli)s.dli=setTimeout"
		+"(s.dlt,s.maxDelay)}else s.dll=0');s.dl=function(vo){var s=this,d=new Date;if(!vo)vo=new Object;s.pt(s.vl_g,',','vo2',vo);vo._t=d.getTime();if(!s.dll)s.dll=new Array;s.dll[s.dll.length]=vo;if(!s.max"
		+"Delay)s.maxDelay=250;s.dlt()};s.t=function(vo,id){var s=this,trk=1,tm=new Date,sed=Math&&Math.random?Math.floor(Math.random()*10000000000000):tm.getTime(),sess='s'+Math.floor(tm.getTime()/10800000)"
		+"%10+sed,y=tm.getYear(),vt=tm.getDate()+'/'+tm.getMonth()+'/'+(y<1900?y+1900:y)+' '+tm.getHours()+':'+tm.getMinutes()+':'+tm.getSeconds()+' '+tm.getDay()+' '+tm.getTimezoneOffset(),tcf,tfs=s.gtfs(),"
		+"ta='',q='',qs='',code='',vb=new Object;s.gl(s.vl_g);s.uns();s.m_ll();if(!s.td){var tl=tfs.location,a,o,i,x='',c='',v='',p='',bw='',bh='',j='1.0',k=s.c_w('s_cc','true',0)?'Y':'N',hp='',ct='',pn=0,ps"
		+";if(String&&String.prototype){j='1.1';if(j.match){j='1.2';if(tm.setUTCDate){j='1.3';if(s.isie&&s.ismac&&s.apv>=5)j='1.4';if(pn.toPrecision){j='1.5';a=new Array;if(a.forEach){j='1.6';i=0;o=new Objec"
		+"t;tcf=new Function('o','var e,i=0;try{i=new Iterator(o)}catch(e){}return i');i=tcf(o);if(i&&i.next)j='1.7'}}}}}if(s.apv>=4)x=screen.width+'x'+screen.height;if(s.isns||s.isopera){if(s.apv>=3){v=s.n."
		+"javaEnabled()?'Y':'N';if(s.apv>=4){c=screen.pixelDepth;bw=s.wd.innerWidth;bh=s.wd.innerHeight}}s.pl=s.n.plugins}else if(s.isie){if(s.apv>=4){v=s.n.javaEnabled()?'Y':'N';c=screen.colorDepth;if(s.apv"
		+">=5){bw=s.d.documentElement.offsetWidth;bh=s.d.documentElement.offsetHeight;if(!s.ismac&&s.b){tcf=new Function('s','tl','var e,hp=0;try{s.b.addBehavior(\"#default#homePage\");hp=s.b.isHomePage(tl)?"
		+"\"Y\":\"N\"}catch(e){}return hp');hp=tcf(s,tl);tcf=new Function('s','var e,ct=0;try{s.b.addBehavior(\"#default#clientCaps\");ct=s.b.connectionType}catch(e){}return ct');ct=tcf(s)}}}else r=''}if(s.p"
		+"l)while(pn<s.pl.length&&pn<30){ps=s.fl(s.pl[pn].name,100)+';';if(p.indexOf(ps)<0)p+=ps;pn++}s.resolution=x;s.colorDepth=c;s.javascriptVersion=j;s.javaEnabled=v;s.cookiesEnabled=k;s.browserWidth=bw;"
		+"s.browserHeight=bh;s.connectionType=ct;s.homepage=hp;s.plugins=p;s.td=1}if(vo){s.pt(s.vl_g,',','vo2',vb);s.pt(s.vl_g,',','vo1',vo)}if(s.usePlugins)s.doPlugins(s);var l=s.wd.location,r=tfs.document."
		+"referrer;if(!s.pageURL)s.pageURL=l.href?l.href:l;if(!s.referrer&&!s._1_referrer){s.referrer=r;s._1_referrer=1}if((vo&&vo._t)||!s.m_m('d')){s.m_m('g');if(s.lnk||s.eo){var o=s.eo?s.eo:s.lnk;if(!o)ret"
		+"urn '';var p=s.pageName,w=1,t=s.ot(o),n=s.oid(o),x=o.s_oidt,h,l,i,oc;if(s.eo&&o==s.eo){while(o&&!n&&t!='BODY'){o=o.parentElement?o.parentElement:o.parentNode;if(!o)return '';t=s.ot(o);n=s.oid(o);x="
		+"o.s_oidt}oc=o.onclick?''+o.onclick:'';if((oc.indexOf(\"s_gs(\")>=0&&oc.indexOf(\".s_oc(\")<0)||oc.indexOf(\".tl(\")>=0)return ''}ta=n?o.target:1;h=s.oh(o);i=h.indexOf('?');h=s.linkLeaveQueryString|"
		+"|i<0?h:h.substring(0,i);l=s.linkName;t=s.linkType?s.linkType.toLowerCase():s.lt(h);if(t&&(h||l))q+='&pe=lnk_'+(t=='d'||t=='e'?s.ape(t):'o')+(h?'&pev1='+s.ape(h):'')+(l?'&pev2='+s.ape(l):'');else tr"
		+"k=0;if(s.trackInlineStats){if(!p){p=s.pageURL;w=0}t=s.ot(o);i=o.sourceIndex;if(s.gg('objectID')){n=s.gg('objectID');x=1;i=1}if(p&&n&&t)qs='&pid='+s.ape(s.fl(p,255))+(w?'&pidt='+w:'')+'&oid='+s.ape("
		+"s.fl(n,100))+(x?'&oidt='+x:'')+'&ot='+s.ape(t)+(i?'&oi='+i:'')}}if(!trk&&!qs)return '';s.sampled=s.vs(sed);if(trk){if(s.sampled)code=s.mr(sess,(vt?'&t='+s.ape(vt):'')+s.hav()+q+(qs?qs:s.rq(s.un)),0"
		+",id,ta);qs='';s.m_m('t');if(s.p_r)s.p_r();s.referrer=''}s.sq(qs);}else{s.dl(vo);}if(vo)s.pt(s.vl_g,',','vo1',vb);s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3='';"
		+"if(s.pg)s.wd.s_lnk=s.wd.s_eo=s.wd.s_linkName=s.wd.s_linkType='';if(!id&&!s.tc){s.tc=1;s.flushBufferedRequests()}return code};s.tl=function(o,t,n,vo){var s=this;s.lnk=s.co(o);s.linkType=t;s.linkName"
		+"=n;s.t(vo)};if(pg){s.wd.s_co=function(o){var s=s_gi(\"_\",1,1);return s.co(o)};s.wd.s_gs=function(un){var s=s_gi(un,1,1);return s.t()};s.wd.s_dc=function(un){var s=s_gi(un,1);return s.t()}}s.ssl=(s"
		+".wd.location.protocol.toLowerCase().indexOf('https')>=0);s.d=document;s.b=s.d.body;if(s.d.getElementsByTagName){s.h=s.d.getElementsByTagName('HEAD');if(s.h)s.h=s.h[0]}s.n=navigator;s.u=s.n.userAgen"
		+"t;s.ns6=s.u.indexOf('Netscape6/');var apn=s.n.appName,v=s.n.appVersion,ie=v.indexOf('MSIE '),o=s.u.indexOf('Opera '),i;if(v.indexOf('Opera')>=0||o>0)apn='Opera';s.isie=(apn=='Microsoft Internet Exp"
		+"lorer');s.isns=(apn=='Netscape');s.isopera=(apn=='Opera');s.ismac=(s.u.indexOf('Mac')>=0);if(o>0)s.apv=parseFloat(s.u.substring(o+6));else if(ie>0){s.apv=parseInt(i=v.substring(ie+5));if(s.apv>3)s."
		+"apv=parseFloat(i)}else if(s.ns6>0)s.apv=parseFloat(s.u.substring(s.ns6+10));else s.apv=parseFloat(v);s.em=0;if(String.fromCharCode){i=escape(String.fromCharCode(256)).toUpperCase();s.em=(i=='%C4%80"
		+"'?2:(i=='%U0100'?1:0))}s.sa(un);s.vl_l='dynamicVariablePrefix,visitorID,vmk,visitorMigrationKey,visitorMigrationServer,visitorMigrationServerSecure,ppu,charSet,visitorNamespace,cookieDomainPeriods,"
		+"cookieLifetime,pageName,pageURL,referrer,currencyCode';s.va_l=s.sp(s.vl_l,',');s.vl_t=s.vl_l+',variableProvider,channel,server,pageType,transactionID,purchaseID,campaign,state,zip,events,products,l"
		+"inkName,linkType';for(var n=1;n<51;n++)s.vl_t+=',prop'+n+',eVar'+n+',hier'+n+',list'+n;s.vl_l2=',tnt,pe,pev1,pev2,pev3,resolution,colorDepth,javascriptVersion,javaEnabled,cookiesEnabled,browserWidt"
		+"h,browserHeight,connectionType,homepage,plugins';s.vl_t+=s.vl_l2;s.va_t=s.sp(s.vl_t,',');s.vl_g=s.vl_t+',trackingServer,trackingServerSecure,trackingServerBase,fpCookieDomainPeriods,disableBuffered"
		+"Requests,mobile,visitorSampling,visitorSamplingGroup,dynamicAccountSelection,dynamicAccountList,dynamicAccountMatch,trackDownloadLinks,trackExternalLinks,trackInlineStats,linkLeaveQueryString,linkD"
		+"ownloadFileTypes,linkExternalFilters,linkInternalFilters,linkTrackVars,linkTrackEvents,linkNames,lnk,eo,_1_referrer';s.va_g=s.sp(s.vl_g,',');s.pg=pg;s.gl(s.vl_g);if(!ss)s.wds()",
		w=window,l=w.s_c_il,n=navigator,u=n.userAgent,v=n.appVersion,e=v.indexOf('MSIE '),m=u.indexOf('Netscape6/'),a,i,s;if(un){un=un.toLowerCase();if(l)for(i=0;i<l.length;i++){s=l[i];if(!s._c||s._c=='s_c'){if(s.oun==un)return s;else if(s.fs&&s.sa&&s.fs(s.oun,un)){s.sa(un);return s}}}}w.s_an='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
		w.s_sp=new Function("x","d","var a=new Array,i=0,j;if(x){if(x.split)a=x.split(d);else if(!d)for(i=0;i<x.length;i++)a[a.length]=x.substring(i,i+1);else while(i>=0){j=x.indexOf(d,i);a[a.length]=x.subst"
		+"ring(i,j<0?x.length:j);i=j;if(i>=0)i+=d.length}}return a");
		w.s_jn=new Function("a","d","var x='',i,j=a.length;if(a&&j>0){x=a[0];if(j>1){if(a.join)x=a.join(d);else for(i=1;i<j;i++)x+=d+a[i]}}return x");
		w.s_rep=new Function("x","o","n","return s_jn(s_sp(x,o),n)");
		w.s_d=new Function("x","var t='`^@$#',l=s_an,l2=new Object,x2,d,b=0,k,i=x.lastIndexOf('~~'),j,v,w;if(i>0){d=x.substring(0,i);x=x.substring(i+2);l=s_sp(l,'');for(i=0;i<62;i++)l2[l[i]]=i;t=s_sp(t,'');d"
		+"=s_sp(d,'~');i=0;while(i<5){v=0;if(x.indexOf(t[i])>=0) {x2=s_sp(x,t[i]);for(j=1;j<x2.length;j++){k=x2[j].substring(0,1);w=t[i]+k;if(k!=' '){v=1;w=d[b+l2[k]]}x2[j]=w+x2[j].substring(1)}}if(v)x=s_jn("
		+"x2,'');else{w=t[i]+' ';if(x.indexOf(w)>=0)x=s_rep(x,w,t[i]);i++;b+=62}}}return x");
		w.s_fe=new Function("c","return s_rep(s_rep(s_rep(c,'\\\\','\\\\\\\\'),'\"','\\\\\"'),\"\\n\",\"\\\\n\")");
		w.s_fa=new Function("f","var s=f.indexOf('(')+1,e=f.indexOf(')'),a='',c;while(s>=0&&s<e){c=f.substring(s,s+1);if(c==',')a+='\",\"';else if((\"\\n\\r\\t \").indexOf(c)<0)a+=c;s++}return a?'\"'+a+'\"':"
		+"a");
		w.s_ft=new Function("c","c+='';var s,e,o,a,d,q,f,h,x;s=c.indexOf('=function(');while(s>=0){s++;d=1;q='';x=0;f=c.substring(s);a=s_fa(f);e=o=c.indexOf('{',s);e++;while(d>0){h=c.substring(e,e+1);if(q){i"
		+"f(h==q&&!x)q='';if(h=='\\\\')x=x?0:1;else x=0}else{if(h=='\"'||h==\"'\")q=h;if(h=='{')d++;if(h=='}')d--}if(d>0)e++}c=c.substring(0,s)+'new Function('+(a?a+',':'')+'\"'+s_fe(c.substring(o+1,e))+'\")"
		+"'+c.substring(e+1);s=c.indexOf('=function(')}return c;");
		c=s_d(c);if(e>0){a=parseInt(i=v.substring(e+5));if(a>3)a=parseFloat(i)}else if(m>0)a=parseFloat(u.substring(m+10));else a=parseFloat(v);if(a>=5&&v.indexOf('Opera')<0&&u.indexOf('Opera')<0){w.s_c=new Function("un","pg","ss","var s=this;"+c);return new s_c(un,pg,ss)}else s=new Function("un","pg","ss","var s=new Object;"+s_ft(c)+";return s");return s(un,pg,ss)}

		return s;
	},
	
    /**
	 * Metodo para configurar cuentas de omniture
	 */
	setup: function () {
		s = this.init();

		/************************** Seccion de configuracion **************************/
		
		// DUDA
		s.cookieDomainPeriods = 3;

		s.siteID = this.getAccount();
		s.defaultPage="";
		s.queryVarsList="";
		s.pathExcludeDelim=";";
		s.pathConcatDelim="/";
		s.visitorNamespace="privalia";
		s.events = s.events ? s.events+',event27':'event27';
		//s.usePlugins=true
		
		
		
		// parametros de configuracion de la cuenta
		s.charSet = "UTF-8";
		s.pageName = window.location.pathname;
		s.pageType = "";
		s.products = "";
		s.trackDownloadLinks = true;
		s.trackExternalLinks = true;
		s.trackInlineStats = true;
		s.trackingServer = "privalia.122.2o7.net";
		s.linkDownloadFileTypes = "exe,zip,wav,mp3,mov,mpg,avi,wmv,doc,pdf,xls";
		s.linkInternalFilters = "javascript:" + this.getInternalFilters();
		s.linkLeaveQueryString = false;
		//s.linkTrackVars = "None";
		//s.linkTrackEvents = "None";
		s.fpCookieDomainPeriods = 2;
		//s.currencyCode = "EUR";


		/************************** Parametros a enviar **************************/
/*
		if(arguments.length > 0) {
			// Pasamos los datos a enviar como un objeto
			var objectData = data.toObject();

			// Pasamos el objeto creado junto con el resto de parametros a traves del objeto s
			s = Object.extend(s, objectData);
		}

		// Pasamos los parametros definidos en el metodo plugins
		s.doPlugins=this.plugins
*/

		/************************** Parametros fijos, no tocar **************************/

		// Plugin: getValOnce 0.2 - get a value once per session or number of days
		s.getValOnce=new Function("v","c","e",""
		+"var s=this,k=s.c_r(c),a=new Date;e=e?e:0;if(v){a.setTime(a.getTime("
		+")+e*86400000);s.c_w(c,v,e?a:0);}return v==k?'':v");
		// Plugin: getQueryParam 2.3 - return query string parameter(s)
		s.getQueryParam=new Function("p","d","u",""
		+"var s=this,v='',i,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.locati"
		+"on);if(u=='f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i<0?p"
		+".length:i;t=s.p_gpv(p.substring(0,i),u+'');if(t){t=t.indexOf('#')>-"
		+"1?t.substring(0,t.indexOf('#')):t;}if(t)v+=v?d+t:t;p=p.substring(i="
		+"=p.length?i:i+1)}return v");

		s.p_gpv=new Function("k","u",""
		+"var s=this,v='',i=u.indexOf('?'),q;if(k&&i>-1){q=u.substring(i+1);v"
		+"=s.pt(q,'&','p_gvf',k)}return v");
/*

		s.p_gvf=new Function("t","k",""
		+"if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'T"
		+"rue':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s."
		+"epa(v)}return ''");



		// Utility Functions: apl, p_c, p_gh, split, replace, join * necesario para que vayan los plugins
		s.apl=new Function("L","v","d","u",""
		+"var s=this,m=0;if(!L)L='';if(u){var i,n,a=s.split(L,d);for(i=0;i<a."
		+"length;i++){n=a[i];m=m||(u==1?(n==v):(n.toLowerCase()==v.toLowerCas"
		+"e()));}}if(!m)L=L?L+d+v:v;return L");
		s.p_c=new Function("v","c",""
		+"var x=v.indexOf('=');return c.toLowerCase()==v.substring(0,x<0?v.le"
		+"ngth:x).toLowerCase()?v:0");
		s.p_gh=new Function(""
		+"var s=this;if(!s.eo&&!s.lnk)return '';var o=s.eo?s.eo:s.lnk,y=s.ot("
		+"o),n=s.oid(o),x=o.s_oidt;if(s.eo&&o==s.eo){while(o&&!n&&y!='BODY'){"
		+"o=o.parentElement?o.parentElement:o.parentNode;if(!o)return '';y=s."
		+"ot(o);n=s.oid(o);x=o.s_oidt}}return o.href?o.href:'';");
		s.split=new Function("l","d",""
		+"var i,x=0,a=new Array;while(l){i=l.indexOf(d);i=i>-1?i:l.length;a[x"
		+"++]=l.substring(0,i);l=l.substring(i+d.length);}return a");
		s.repl=new Function("x","o","n",""
		+"var i=x.indexOf(o),l=n.length;while(x&&i>=0){x=x.substring(0,i)+n+x."
		+"substring(i+o.length);i=x.indexOf(o,i+l)}return x");
		s.join = new Function("v","p",""
		+"var s = this;var f,b,d,w;if(p){f=p.front?p.front:'';b=p.back?p.back"
		+":'';d=p.delim?p.delim:'';w=p.wrap?p.wrap:'';}var str='';for(var x=0"
		+";x<v.length;x++){if(typeof(v[x])=='object' )str+=s.join( v[x],p);el"
		+"se str+=w+v[x]+w;if(x<v.length-1)str+=d;}return f+str+b;");
*/

		this.s = s;
	},

	/**
	 * Agregar a la var s.events un array de valores
	 * El conjunto de valores events se enviaran a omniture
	 */
	_multiset: function (aValues, aArray) {
		if(Object.isArray(aValues) && aValues.size() > 0) {
			aValues.each(function (sItem) {
				this._set(sItem, aArray);
			}, this);
		}
	},
	
     /**
     * Rellenar el string "value" de caracteres "char" por la izquierda hasta llegar a largo "length".
     * @param {String} value
     * @param {char} char
     * @param {int} length
     * @return {String}
     */
    _padLeft: function (sValue, sChar, nLength) {
    	if (!sChar) return sValue;
    	sValue = "" + sValue;
    	while (sValue.length < nLength) {
    		sValue = sChar + sValue;
    	}
    	return sValue;
    },
	/**
     * Agregar a la var s.events un valor
     * El conjunto de valores events se enviaran a omniture
     */
    _set: function (sValue, aArray) {
    	aArray.push(sValue);
    }
});

PRV.Tracker.Omni = new Omniture();/**
 *  privalia.addressbase.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, privalia.base.js
 * @revision: 	1.0
 */

/**
 * PrivaliaAddressBase - Common
 * =========================================
 * @modified:     Fede    (18-01-11)
 */
var PrivaliaAddressBase = new Class.create(PrivaliaBase, {
    initialize: function($super) {
        $super();

        this.code_editAddress =		'msg0300002';					// datos actualizados
        this.code_minAddress =		'msg0230010';					// minimo 1 direccion
        this.code_newAddress =		'msg0330010';					// nueva direccion anadida

        this.confirmDeleteMsg =     'You are about to delete the address. Continue?';

    	this.changeAddressModal = 	false;

        this.duration_icons =		0.3;

        this.idAddressForm=			'';
		this.idAddressInput =		'';
		this.isAlreadyCheckedFlag = false;							// registra si el boton de editar pulsado corresponde a un radio button ya seleccionado
        this.idDivRegisterForm =	'divFormAddress';				// div que contiene inicialmente el formulario de direcciones
        this.idRegisterForm =		'registerFormAddress';
        this.idPrefixAddress =		'ad_';
        this.idPrefixAddressStatic ='adstatic_';
		this.idPrefixAddressInput = 'delivery_ad_';
        this.idTargetIconEdition =  'memberAddresses';				// div que contiene lista de direcciones

        this.s_addAddBtn = 			'';
        this.s_addAddMsg = 			'';
        this.s_addressPK =			'';
        this.s_editAddBtn = 		'';
        this.s_editAddMsg = 		'';
        this.s_section =			'mycart';						// para controlar comportamiento del form segun la seccion donde estamos

        this.url_actionForm =		[];
        this.url_actionForm['add'] = '/myaccount/addUserAddress';
        this.url_actionForm['edit'] = '/myaccount/editUserAddress';

        this.v_zipcodeError =		[];

        this.zipCodeErrorMsg = 		false;

      //version
    	this.version =				1.1;				//modificar version al crear un nuevo metodo
    	this.setVersion(this.version, 'PrivaliaAddressBase');
    },

    /**
     * abre formulario para anyadir direccion
     */
    addAddress: function() {
        // vacio los campos
        Form.reset(this.idRegisterForm);
        $('memaddress_state_span').update('');

        if(this.s_section == 'myaccount') {
          // actualizar cabecera del form - Modificado por Naiara 26/05/2011
          $('common_address_text').update(this.getTxt("addmsg"));
          // escondemos el texto de campo requerido ya que sale debajo de la box-info
          $('requiredText').hide();
          $('box-info').show();

        }

        // abrir form
    	this._openForm(this.idRegisterForm + this.sah_sufix, 'add');
    },

    /**
     * Cerrar form de direccion
     */
    cancel: function () {
      //Volcamos el contenido del formulario de direcciones dentro del div inicial para poder volver a modificarlo
      this._updateDivRegForm();
      this.showIconsEdition();
      this.showAndHide();
    },
    /**
	 * Proceso para eliminar un direccion indicandole el pk de la direccion  y la id div a eliminar
	 */
    deleteAddress: function() {
    	if(!Object.isUndefined(this.modalDeleteAddress)) {
			this.modalDeleteAddress.close();
		}
        this._submitDeleteAddress(this.delpk, this.deldiv);
    },
    /**
	 * Abre el modal para eliminar una direccion y almacena pk de la direccion y la id div a eliminar
	 */
    deleteAddressModal: function(modal, pk, div) {
    	this.modalDeleteAddress = modal;
		modal.open();
		this.delpk = pk;
		this.deldiv = div;
    },

    	/**
	 * Metodo para editar las direcciones especifico en Mycart/Summary
	 * @param {Object} pk
	 */
	editMyCartAddress: function(pk){
		this.idAddressInput = this.idPrefixAddressInput + pk;
		// Registramos si el boton pulsado fue previamente seleccionado
		if($(this.idAddressInput).checked){
			this.isAlreadyCheckedFlag = true;
		}
		this.editAddress(pk);
	},
    /**
     * Recoge los datos de la direccion que le pasamos con el pk y los carcga en el form.
     * Le pasamos la seccion desde donde se hace la llamada (myaccount o mycart) para indicarle aquellos componentes a ocultar y mostrar
     */
    editAddress: function(pk) {
    	this.idAddressForm = this.idPrefixAddress + pk;
      	this.s_addressPK = pk;

      	// cargar los datos de la direccion a editar en el formulario
      	this.setAddressInputs(pk);

        // IE7 forced
        this.updateRover('memaddress_state_span', $('memaddress_state').value);

        // en editar no hay box-info, por lo que se oculta
        if (this.s_section == "mycart" || this.s_section == "newreturn") {
			if($('infonewaddres')!== null){
          $('infonewaddres').hide();
        }
        }else if(this.s_section == 'myaccount') {
        	//Modificado por Naiara 26/05/2011
			$('common_address_text').update(this.getTxt("editmsg"));
          // mostramos el texto de campo requerido ya que no sale la box-info
          $('requiredText').show();
          $('box-info').hide();
        }

        // abrir form
      this._openForm(this.idAddressForm, 'edit');
    },

    /**
     * Busca dentro del div de direcciones todos los botones para anadir, editar o eliminar y los oculta
     */
    hideIconsEdition: function() {
        $$('#' + this.idTargetIconEdition + ' .delete').each(this._hideIcons, this);
        $$('#' + this.idTargetIconEdition + ' .edit').each(this._hideIcons, this);
        $$('#registerFormAddress_data').each(this._hideIcons, this); // el boton anadir direccion

		//Eliminamos momentaneamente el resto de direcciones
        // redesign - esta funcionalidad cae con el redisenyo. Las direcciones se mostraran siempre
		$$('#' + this.idTargetIconEdition + ' .address').each(this._hideIcons, this);
    },

    /**
     * Asignar copy correspondiente a añadir y editar direccion
     */
    setAddresCopy: function(lnk, btn, lnk2, btn2) {
    	/*** MODIFICADO POR NAIARA (27/05/2011) ***/
        /*this.s_addAddMsg = lnk;
        this.s_addAddBtn = btn;
        this.s_editAddMsg = lnk2;
        this.s_editAddBtn = btn2;*/
    	this.setTxt("addmsg", lnk);
    	this.setTxt("addbtn", btn);
    	this.setTxt("editmsg", lnk2);
    	this.setTxt("editbtn", btn2);
    },

    /**
     * Asignar valor del memaddress_PK de la direccion de envio selecionada para enviar en el formulario de pago
     */
    setAddresSummary: function(address) {
        $('address_delivery').value = address;
    },

    /**
     * Seteamos el status de la modal de cambio de direccion
     * @param {Object} status
     */
    setChangeAddressModal: function(status) {
        this.changeAddressModal = status;
    },

    /**
     * Adresses - Setea la seccion actual dentro de la web 
     * @param {Object} section
     */
    setSection: function (section) {
      this.s_section = section;
    },

    /**
   * guardar los diferentes posibles errores del codigo postal
   */
    setZipCodeErrorMsg: function(code, msg) {
      this.v_zipcodeError[code] = msg;
      this.zipCodeErrorMsg = true;
    },

	/**
	 * Carga el copy del mensaje de confirmacion de eliminacion
	 * @param {Object} txt
	 */
    setDeleteConfirmMsg: function(txt) {
      this.confirmDeleteMsg = txt;
    },

    /**
     * Devuelve la provincia a partir del codigo postal
     */
    setProvince: function (i_postalCode)
    {
      var s_msg = '';
      var i_locality = $('memaddress_city').value;

        // usa la clase Country, que se halla en cada carpeta de pais.
        var s_provinceName = Country.getProvinceFromPostalCode(i_postalCode, i_locality);
        // si el codigo recibido es de error mostramos el texto correspondiente
        if (typeof(s_provinceName) == "number"){
          if (this.zipCodeErrorMsg) {
            switch(s_provinceName){
                case 0:
                      s_msg = this.v_zipcodeError['notvalid'];
                      break;
                  case 1:
                    s_msg = this.v_zipcodeError['notdeliverarea'];
                      break;
                  case 3:
                    s_msg = this.v_zipcodeError['locationinvalid'];
                      break;
                  default:
                    s_msg = this.v_zipcodeError['notvalid'];
                      break;
            }

              this.updateRover('memaddress_state_span', s_msg);
               $('memaddress_state_span').addClassName('clr-red');
               $('memaddress_city').value = '';
          }
             return false;
        }
        else{
          if ($('memaddress_state_span').hasClassName('clr-red')){
            $('memaddress_state_span').removeClassName('clr-red');
          }
            $('memaddress_state').value = s_provinceName;
            this.updateRover('memaddress_state_span', s_provinceName);
            return true;
        }
    },

    /**
     * Se indica el id del div que contiene los iconos de editar
     * @param {Object} id_editIcons
     */ 
    setIconEdition: function(id_editIcons) {
        this.idTargetIconEdition = id_editIcons;
    },


    /**
     * Busca dentro del div de direcciones todos los botones  para anadir, editar o eliminar y los muestra
     */
    showIconsEdition: function() {
        $$('#' + this.idTargetIconEdition + ' .delete').each(this._showIcons, this);
        $$('#' + this.idTargetIconEdition + ' .edit').each(this._showIcons, this);
        $$('#registerFormAddress_data').each(this._showIcons, this);// el boton anadir direccion

		//Mostramos de nuevo el resto de direcciones
		$$('#' + this.idTargetIconEdition + ' .address').each(this._showIcons, this);
    },

    /**
     * Personalizamos la respuesta del submit, 
     * en funcion de un tercer parametro
     */
    submit: function ($super, idForm, checked) {
		if(checked != undefined){
			if(checked){
				$super(idForm, this._responseMyCartSubmit.bind(this));
			}else{
		    	$super(idForm, this._responseSubmit.bind(this));
			}
		}else{
      $super(idForm, this._responseSubmit.bind(this));
		}
    },
	/**
	 * Envio de direcciones en Mycart, 
	 * dependiente de si la direccion estaba ya seleccionada
	 * @param {Object} id
	 */
	submitMyCartAddress: function(idForm){
		if(this.isAlreadyCheckedFlag){
			this.submit(idForm, true);
		}else{
			this.submit(idForm, false);
		}
    },

	/**
	 * Elimina el codigo de una direccion
	 * @param {Object} id
	 */
    _deleteAddressHtml: function (id) {
      if(id != '') {
        $(id).puff({duration:0.5});
    }
    },

    /**
     * Funcion auxiliar para ocultar iconos mediante un efecto
     */
    _hideIcons: function(icon) {
        $(icon).fade({duration: this.duration_icons});
    },

    /**
     * cargar el formulario debajo de la lista de direcciones
     */
    _openForm: function (putAfter, mode) {
      	this.hideIconsEdition();

        // cargar el formulario debajo de la direccion
         $(putAfter).insert({after:$(this.idRegisterForm)});

        $(this.idRegisterForm).action = this.url_actionForm[mode];
        if(mode == 'edit') {
          this.showAndHide(this.idRegisterForm, putAfter);
          //Modificado por Naiara 26/05/2011
          this.updateRover('common_address_btn', this.getTxt("editbtn"));
        }
        else { // add
          this.showAndHide(this.idRegisterForm);
          //Modificado por Naiara 26/05/2011
          this.updateRover('common_address_btn', this.getTxt("addbtn"));
        }
    },

    /**
     * Respuesta tras el envio de datos submit()
     */
    _responseSubmit: function(response) {
      	this.parseResponse(response);
		if(this.statusOK()) {
			//Volcamos el contenido del formulario de direcciones dentro del div inicial para poder volver a modificarlo
			this._updateDivRegForm();
			// cerrar formulario
			this.closeForm();

			switch(this.getResTextcodes()) {
				// si esta anadiendo una direccion nueva, escribimos la nueva direccion
				case this.code_newAddress:
					if (this.changeAddressModal){
						//si estamos en la modal de cambiar talla
						Data2.reload(); //TODO: Marcos - Conseguir pasar aqui el Data2
					}else{
						this.refreshPage();	//Anteriormente, addAdressHtml()
					}
				break;

				// refrescar los datos de forma manual para las direcciones
				case this.code_editAddress:
					this.reload();
				break;
			}

			// mostrar mensaje de notificacion
			this.pointAddressNotify(this.getResTextcodes());
			//this.notify(this.getResTextcodes());
			this.showIconsEdition();
		} else {

		  this.endSubmitError();
	    }
	    this.stopLoad();
		this.stopTimeout();
    },

    /**
     * Respuesta tras el envio de datos submit() en MyCart
     */
    _responseMyCartSubmit: function(response) {
      	this.parseResponse(response);
		if(this.statusOK()) {
			//Volcamos el contenido del formulario de direcciones dentro del div inicial para poder volver a modificarlo
			this._updateDivRegForm();
			// cerrar formulario
			this.closeForm();

			switch(this.getResTextcodes()) {
				// si esta anadiendo una direccion nueva, escribimos la nueva direccion
				case this.code_newAddress:
					if (this.changeAddressModal){
						//si estamos en la modal de cambiar talla
						Data2.reload(); //TODO: Marcos - Conseguir pasar aqui el Data2
					}else{
						this.refreshPage();	//Anteriormente, addAdressHtml()
					}
				break;

				// refrescar los datos de forma manual para las direcciones
				case this.code_editAddress:
					this.reload();
				break;
			}

			// mostrar mensaje de notificacion
			this.notify(this.getResTextcodes());
			this.showIconsEdition();
			
			// llamamos a recargar la pagina para actualizar los gastos de envío
			reloadSummary();
			
		} else {
		  this.endSubmitError();
	    }
	    this.stopLoad();
		this.stopTimeout();
    },
    pointAddressNotify: function (textcode) {
    	if(this.s_addressPK != '') {
    		var target = 'ad_' + this.s_addressPK + '_tooltip';
    		// creamos tooltip
			var Tip = new PrivaliaTooltip(target, MSGCODE[textcode], {
				closeBtn: 	false,
				showNow: 	true,
				status:		'ok',
				autoClose:	8
			});
			
			Tip.setPosition(140, -7);
    	}
    },

	/**
	 * Muestra un icono
	 * @param {Object} icon
	 */
    _showIcons: function(icon) {
        $(icon).appear({duration: this.duration_icons + 0.3});
    },

    /**
	 * Proceso ajax para eliminar una direccion
	 */
    _submitDeleteAddress: function(pk, div) {
        if(pk != '') {
            var othis = this;
            var url = '/myaccount/deleteUserAddress';
            var idAddress = 'ad_' + pk;
            this.load(div);
            new Ajax.Request(url, {
                parameters: 'memaddress_PK=' + pk,
                onComplete: (function(response) {
                    this.parseResponse(response);
                    if(this.statusOK()) {
                        // eliminar direccion de la pagina
                        this._deleteAddressHtml(idAddress);
                        this.notify(this.getResTextcodes());
                    }
                    else {
                      // no se pueden eliminar todas las direcciones
                      this.notify(this.getResTextcodes());
                }
                    othis.stopLoad();
                }).bind(this),
                onException: (function() {
                    this.stopLoad();
                }).bind(this),
                onFailure: (function() {
                    if (this.debug) {
                        console.log('fail');
                    }
                }).bind(this)
            });
        }
    },

    /**
     * Volcamos el contenido del formulario de direcciones dentro del div inicial para poder volver a modificarlo
     */
    _updateDivRegForm: function () {
      $(this.idDivRegisterForm).update($(this.idRegisterForm));
    }
});

/**
 * Al editar o anadir una direccion, alimentamos los selects del formulario y cargamos el form en el objeto DataAddress
 */
function initFormAddress() {
    var Data = new PrivaliaAddress();

    // selects del formulario
    Data.getDataSelect('memaddress_street_type');
    Data.getDataSelect('memaddress_adtype');
    Data.getDataSelect('memaddress_street_number_type');
}
/**
 *  privalia.analytics.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 80-privalia.core.js
 */

/**
 * PrivaliaAnalytics - Common
 * =========================================
 * @modified:     Mike (06-06-11)
 */
var PrivaliaAnalytics = new Class.create(PrivaliaCoreAnalytics, {
    initialize: function($super) {
		$super();

		this.channel =			"";		// Variable que recoge el nombre de la seccion de la web
		this.pageName =			"";		// Variable que recoge el nombre de la pagina de la web
		this.pathName =			"";		// Variable que contiene la ruta de la seccion
		this.compositeChannel =	"";		// Variable que contiene la seccion, con excepciones
		this.internalFilter =	"";		// Variable que recoge la url de cada pais
		this.event =			"";		// Variable que almacena el evento a enviar en cada pagina
		this.sObject =			"";		// Variable que almacena la config del objeto s de omniture

		//version
    	this.version =				1.4;				//modificar version al crear un nuevo metodo
    	this.setVersion(this.version, 'PrivaliaAnalytics');
	},

	/**
	 * Asocia los datos recibidos(evars) a las variables que se van a enviar
	 */
	associateData: function(evars){
		// Creamos el nuevo set de keys y values
		var DataAnalytics = new Hash();

		// Por cada parametro que contenga evars lo adjuntamos con su correspondiente valor
		evars.split(",").each(function(key) {
			var value = this.jsonObject.get(key);
			// adjuntamos las variables tipo eVar de omniture que se van a enviar al objeto
			DataAnalytics.set(key,value);
			// filtra o aplica condiciones segun el valor de los parametros si hiciese falta(opcional), y vuelca el resultado despues de ser procesado en el metodo
			this.event = this.standardEvents(key,value);
		}, this);

		return DataAnalytics;
	},

	/**
	 *  Metodo para determinar pais y su respectivo perfil de tracking. La cuenta para desarrollo es "privdev"
	 */
	countryProfile: function(country){
		var resultCountry = country.toLowerCase();
		if(resultCountry != ""){
		
			if(this.debug) {
				switch (resultCountry){
					case 'es':
						// nombre de la cuenta a la que se enviaran los datos
						this.internalFilter= ",es.privalia.loc,es.secure.privalia.loc";
						break;
					case 'it':
						this.internalFilter= ",it.privalia.com,it.secure.privalia.com";
						break;
					case 'br':
						this.internalFilter= ",br.privalia.com,br.secure.privalia.com";
						break;
					case 'mex':
						this.internalFilter= ",mex.privalia.com,mex.secure.privalia.com";
						break;
				}
				var s_account = "privdev";
			}
			else {
				switch (resultCountry){
				case 'es':
					// nombre de la cuenta a la que se enviaran los datos
					var s_account="privspain";
					this.internalFilter= ",es.privalia.com,es.secure.privalia.com";
					break;
				case 'it':
					var s_account="privitaly";
					this.internalFilter= ",it.privalia.com,it.secure.privalia.com";
					break;
				case 'br':
					var s_account="privbrazil";
					this.internalFilter= ",br.privalia.com,br.secure.privalia.com";
					break;
				case 'mex':
					var s_account="privmexico";
					this.internalFilter= ",mex.privalia.com,mex.secure.privalia.com";
					break;
				}
			}
		
		}
		return s_account;

	},

	/**
	 * Metodo para ejecutar el codigo con los parametros a enviar mas la configuracion de omniture
	 */
	executeCode: function(data){
		// Ejecutamos el metodo que contiene la configuracion de la cuenta omniture y los parametros necesarios
		var s = this.setOmnitureConfig(data);
		// almacenamos el objeto s para poder utilizarlo en el proceso de los custom events
		this.sObject = s;
		// conjunto de parametros
		var s_code=s.t();
		// s.tl(true, 'o') activa el onclick automatico de omniture que trackea datos secundarios
		//s.tl(true, 'o');
	},

	/**
	 * Metodo en el que se definen los plugins utilizados con los parametros necesarios
	 */
	plugins: function (s) {
		// plugin que sirve para anyadir cualquier valor a una lista, en este caso la lista es s.events y el valor es event1
		//s.events=s.apl(s.events,'event1',',',1);
	},

	/**
	 * Procesamos y formateamos datos recibidos
	 */
	processData: function($super, jsonData){
		var junk = $super(jsonData),
		publicPages = ["technicalissuespub", "security", "whatweoffer", "indexpub", "workwithus", "register" , "about"],
		resultUrl = this.url_section.split("/");	// Recogemos la url de la seccion y pagina
		
		// Url seccion
		this.channel = resultUrl[3];
		// Url pagina
		this.pageName = resultUrl[4];
		// Url seccion
		this.pathName = window.location.pathname;
		
		//Generamos el valor de compositeChannel
		if(publicPages.indexOf(resultUrl[4]) !== -1){
			if (this.channel == 'help'){
				this.compositeChannel = "public/" + resultUrl[3];
			}else{
				this.compositeChannel = "public/" + resultUrl[4];
			}
		}else{
			if (this.channel == 'microsites') {
				this.compositeChannel = "private/" + resultUrl[4];
			}else{
				this.compositeChannel = "private/" + resultUrl[3];
			}
		}

		// Ejemplo de posiciones: http:/= 0 /= 1 es.privalia.loc/= 2 microsites/= 3 index/= 4 (los valores se recogen sin slash(/))
		switch(this.channel) {
			case 'microsites':
				var DataAnalytics = this.processDataMicrosites();
				break;
			case 'mycart':
				var DataAnalytics = this.processDataMycart();
				break;
			case 'myaccount':
				var DataAnalytics = this.processDataMyaccount();
				break;
			// si no existe coincidencia, se enviara la seccion y la pagina con los datos basicos de tracking
			default:
				var DataAnalytics = this.processDataBasic();
				break;
		}

		return DataAnalytics;
	},

	/**
	 * Pasamos las variables correspondientes para el tracking de paginas segun sea la seccion
	 */
	processDataMicrosites: function() {
		var evars = '';
		
		// comprueba si no contiene ningun parametro = undefined
		if(!this.pageName){
			// si no tiene le asignamos el valor 'index' puesto que corresponde al listado de campanyas
			this.pageName = 'index';
		}
		switch(this.pageName){
			// section: listado de campanyas
			case 'index':
				// la variable evar almacena las variables que se van a enviar en un array
				evars = "prop1,prop2,prop4,prop5,eVar2,eVar3,eVar4,eVar5,eVar6,eVar7,products";
				// pasamos la variable evar al metodo que las procesa
				DataAnalytics = this.associateData(evars);break;
			// section: home de camapanya
			case 'home':
				evars = "prop1,prop2,prop3,eVar2,eVar3,eVar24,eVar25,products";
				DataAnalytics = this.associateData(evars);break;
			// section: listado de productos de una campanya
			case 'shopwindow':
				evars = "prop1,prop3,eVar2,eVar24,eVar25,products";
				DataAnalytics = this.associateData(evars);break;
			// section: detalle de producto
			case 'fittingroom':
				evars = "prop1,prop3,prop6,eVar2,eVar24,eVar25,eVar26,eVar27,eVar29,products";
				DataAnalytics = this.associateData(evars);break;
			default:
				evars ="";
				DataAnalytics = this.associateData(evars);break;
		}

		return DataAnalytics;
	},
	
	/**
	 * Pasamos las variables correspondientes para el tracking de paginas segun sea la seccion
	 */
	processDataMyaccount: function() {
		evars = "server,prop1,prop3,eVar2,eVar24,products,purchaseID";
		DataAnalytics = this.associateData(evars);
		return DataAnalytics;
	},
	
	/**
	 * Pasamos las variables correspondientes para el tracking de paginas segun sea la seccion
	 */
	processDataMycart: function() {
		evars = "server,prop1,prop3,eVar2,eVar24,products,purchaseID";
		DataAnalytics = this.associateData(evars);
		return DataAnalytics;
	},

	/**
	 * Envia los datos basicos de tracking
	 */
	processDataBasic: function() {
		// si no contiene nigun parametro o el parametro es index, es que es la home publica
		if(!this.pageName || this.pageName == 'index'){
			// le atribuimos el autentico nombre de la home publica: "index"
			// para que en el tracking no se diferencien una de la otra y contabilizen como paginas distintas
			this.pageName = 'index';
		}
		// esta variable no envia ningun dato util, sirve como flag para reconocer los trackings basicos
		evars = "";
		DataAnalytics = this.associateData(evars);
		return DataAnalytics;
	},

	/**
	 * Metodo para configurar cuentas de omniture
	 */
	setOmnitureConfig: function(data){

		/************************** Seccion de configuracion **************************/

		// se activa la cuenta segun el pais
		var account = this.countryProfile(Country.getIso());
		var s=s_gi(account);

		// parametros de configuracion de la cuenta
		s.pageType= "";
//		s.pageName= account + "/" + this.pageName; 
		s.pageName= this.pathName;
		//s.channel = this.channel + "/" + this.pageName;
		s.channel = this.compositeChannel;
		s.charSet="UTF-8";
		s.cookieDomainPeriods=3;
		s.fpCookieDomainPeriods= 2;
		s.trackDownloadLinks=true;
		s.trackExternalLinks=true;
		s.trackInlineStats=true;
		s.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,doc,pdf,xls";
		s.linkInternalFilters = "javascript:" + this.internalFilter;
		s.linkLeaveQueryString=false;
		s.linkTrackVars="None"
		s.linkTrackEvents="None"
		s.siteID=account;
		s.defaultPage="";
		s.queryVarsList="";
		s.pathExcludeDelim=";";
		s.pathConcatDelim="/";
		s.visitorNamespace="privalia"
		s.trackingServer="privalia.122.2o7.net"
		s.events=this.event;
		s.events=s.events?s.events+',event27':'event27';
		s.usePlugins=true

		//s.campaign="";
		//s.eVar1="";
		//s.currencyCode="EUR"


		/************************** Parametros a enviar **************************/

		if(arguments.length > 0) {
			// Pasamos los datos a enviar como un objeto
			var objectData = data.toObject();

			// Pasamos el objeto creado junto con el resto de parametros a traves del objeto s
			s = Object.extend(s, objectData);
		}

		// Pasamos los parametros definidos en el metodo plugins
		s.doPlugins=this.plugins


		/************************** Parametros fijos, no tocar **************************/

		// Plugin: getQueryParam 2.3 - return query string parameter(s)
		s.getQueryParam=new Function("p","d","u",""
		+"var s=this,v='',i,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.locati"
		+"on);if(u=='f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i<0?p"
		+".length:i;t=s.p_gpv(p.substring(0,i),u+'');if(t){t=t.indexOf('#')>-"
		+"1?t.substring(0,t.indexOf('#')):t;}if(t)v+=v?d+t:t;p=p.substring(i="
		+"=p.length?i:i+1)}return v");

		s.p_gpv=new Function("k","u",""
		+"var s=this,v='',i=u.indexOf('?'),q;if(k&&i>-1){q=u.substring(i+1);v"
		+"=s.pt(q,'&','p_gvf',k)}return v");

		s.p_gvf=new Function("t","k",""
		+"if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'T"
		+"rue':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s."
		+"epa(v)}return ''");

		// Plugin: getValOnce 0.2 - get a value once per session or number of days
		s.getValOnce=new Function("v","c","e",""
		+"var s=this,k=s.c_r(c),a=new Date;e=e?e:0;if(v){a.setTime(a.getTime("
		+")+e*86400000);s.c_w(c,v,e?a:0);}return v==k?'':v");


		// Utility Functions: apl, p_c, p_gh, split, replace, join * necesario para que vayan los plugins
		s.apl=new Function("L","v","d","u",""
		+"var s=this,m=0;if(!L)L='';if(u){var i,n,a=s.split(L,d);for(i=0;i<a."
		+"length;i++){n=a[i];m=m||(u==1?(n==v):(n.toLowerCase()==v.toLowerCas"
		+"e()));}}if(!m)L=L?L+d+v:v;return L");
		s.p_c=new Function("v","c",""
		+"var x=v.indexOf('=');return c.toLowerCase()==v.substring(0,x<0?v.le"
		+"ngth:x).toLowerCase()?v:0");
		s.p_gh=new Function(""
		+"var s=this;if(!s.eo&&!s.lnk)return '';var o=s.eo?s.eo:s.lnk,y=s.ot("
		+"o),n=s.oid(o),x=o.s_oidt;if(s.eo&&o==s.eo){while(o&&!n&&y!='BODY'){"
		+"o=o.parentElement?o.parentElement:o.parentNode;if(!o)return '';y=s."
		+"ot(o);n=s.oid(o);x=o.s_oidt}}return o.href?o.href:'';");
		s.split=new Function("l","d",""
		+"var i,x=0,a=new Array;while(l){i=l.indexOf(d);i=i>-1?i:l.length;a[x"
		+"++]=l.substring(0,i);l=l.substring(i+d.length);}return a");
		s.repl=new Function("x","o","n",""
		+"var i=x.indexOf(o),l=n.length;while(x&&i>=0){x=x.substring(0,i)+n+x."
		+"substring(i+o.length);i=x.indexOf(o,i+l)}return x");
		s.join = new Function("v","p",""
		+"var s = this;var f,b,d,w;if(p){f=p.front?p.front:'';b=p.back?p.back"
		+":'';d=p.delim?p.delim:'';w=p.wrap?p.wrap:'';}var str='';for(var x=0"
		+";x<v.length;x++){if(typeof(v[x])=='object' )str+=s.join( v[x],p);el"
		+"se str+=w+v[x]+w;if(x<v.length-1)str+=d;}return f+str+b;");


		// No tocar el siguiente codigo, prepara los parametros dados para poder enviarlos
		var s_code='',s_objectID;function s_gi(un,pg,ss){var c="s._c='s_c';s.wd=window;if(!s.wd.s_c_in){s.wd.s_c_il=new Array;s.wd.s_c_in=0;}s._il=s.wd.s_c_il;s._in=s.wd.s_c_in;s._il[s._in]=s;s.wd.s_c_in++;s"
		+".an=s_an;s.cls=function(x,c){var i,y='';if(!c)c=this.an;for(i=0;i<x.length;i++){n=x.substring(i,i+1);if(c.indexOf(n)>=0)y+=n}return y};s.fl=function(x,l){return x?(''+x).substring(0,l):x};s.co=func"
		+"tion(o){if(!o)return o;var n=new Object,x;for(x in o)if(x.indexOf('select')<0&&x.indexOf('filter')<0)n[x]=o[x];return n};s.num=function(x){x=''+x;for(var p=0;p<x.length;p++)if(('0123456789').indexO"
		+"f(x.substring(p,p+1))<0)return 0;return 1};s.rep=s_rep;s.sp=s_sp;s.jn=s_jn;s.ape=function(x){var s=this,h='0123456789ABCDEF',i,c=s.charSet,n,l,e,y='';c=c?c.toUpperCase():'';if(x){x=''+x;if(c=='AUTO"
		+"'&&('').charCodeAt){for(i=0;i<x.length;i++){c=x.substring(i,i+1);n=x.charCodeAt(i);if(n>127){l=0;e='';while(n||l<4){e=h.substring(n%16,n%16+1)+e;n=(n-n%16)/16;l++}y+='%u'+e}else if(c=='+')y+='%2B';"
		+"else y+=escape(c)}x=y}else{x=x?s.rep(escape(''+x),'+','%2B'):x;if(x&&c&&s.em==1&&x.indexOf('%u')<0&&x.indexOf('%U')<0){i=x.indexOf('%');while(i>=0){i++;if(h.substring(8).indexOf(x.substring(i,i+1)."
		+"toUpperCase())>=0)return x.substring(0,i)+'u00'+x.substring(i);i=x.indexOf('%',i)}}}}return x};s.epa=function(x){var s=this;return x?unescape(s.rep(''+x,'+',' ')):x};s.pt=function(x,d,f,a){var s=th"
		+"is,t=x,z=0,y,r;while(t){y=t.indexOf(d);y=y<0?t.length:y;t=t.substring(0,y);r=s[f](t,a);if(r)return r;z+=y+d.length;t=x.substring(z,x.length);t=z<x.length?t:''}return ''};s.isf=function(t,a){var c=a"
		+".indexOf(':');if(c>=0)a=a.substring(0,c);if(t.substring(0,2)=='s_')t=t.substring(2);return (t!=''&&t==a)};s.fsf=function(t,a){var s=this;if(s.pt(a,',','isf',t))s.fsg+=(s.fsg!=''?',':'')+t;return 0}"
		+";s.fs=function(x,f){var s=this;s.fsg='';s.pt(x,',','fsf',f);return s.fsg};s.si=function(){var s=this,i,k,v,c=s_gi+'var s=s_gi(\"'+s.oun+'\");s.sa(\"'+s.un+'\");';for(i=0;i<s.va_g.length;i++){k=s.va"
		+"_g[i];v=s[k];if(v!=undefined){if(typeof(v)=='string')c+='s.'+k+'=\"'+s_fe(v)+'\";';else c+='s.'+k+'='+v+';'}}c+=\"s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3=''"
		+";\";return c};s.c_d='';s.c_gdf=function(t,a){var s=this;if(!s.num(t))return 1;return 0};s.c_gd=function(){var s=this,d=s.wd.location.hostname,n=s.fpCookieDomainPeriods,p;if(!n)n=s.cookieDomainPerio"
		+"ds;if(d&&!s.c_d){n=n?parseInt(n):2;n=n>2?n:2;p=d.lastIndexOf('.');if(p>=0){while(p>=0&&n>1){p=d.lastIndexOf('.',p-1);n--}s.c_d=p>0&&s.pt(d,'.','c_gdf',0)?d.substring(p):d}}return s.c_d};s.c_r=funct"
		+"ion(k){var s=this;k=s.ape(k);var c=' '+s.d.cookie,i=c.indexOf(' '+k+'='),e=i<0?i:c.indexOf(';',i),v=i<0?'':s.epa(c.substring(i+2+k.length,e<0?c.length:e));return v!='[[B]]'?v:''};s.c_w=function(k,v"
		+",e){var s=this,d=s.c_gd(),l=s.cookieLifetime,t;v=''+v;l=l?(''+l).toUpperCase():'';if(e&&l!='SESSION'&&l!='NONE'){t=(v!=''?parseInt(l?l:0):-60);if(t){e=new Date;e.setTime(e.getTime()+(t*1000))}}if(k"
		+"&&l!='NONE'){s.d.cookie=k+'='+s.ape(v!=''?v:'[[B]]')+'; path=/;'+(e&&l!='SESSION'?' expires='+e.toGMTString()+';':'')+(d?' domain='+d+';':'');return s.c_r(k)==v}return 0};s.eh=function(o,e,r,f){var"
		+" s=this,b='s_'+e+'_'+s._in,n=-1,l,i,x;if(!s.ehl)s.ehl=new Array;l=s.ehl;for(i=0;i<l.length&&n<0;i++){if(l[i].o==o&&l[i].e==e)n=i}if(n<0){n=i;l[n]=new Object}x=l[n];x.o=o;x.e=e;f=r?x.b:f;if(r||f){x."
		+"b=r?0:o[e];x.o[e]=f}if(x.b){x.o[b]=x.b;return b}return 0};s.cet=function(f,a,t,o,b){var s=this,r,tcf;if(s.apv>=5&&(!s.isopera||s.apv>=7)){tcf=new Function('s','f','a','t','var e,r;try{r=s[f](a)}cat"
		+"ch(e){r=s[t](e)}return r');r=tcf(s,f,a,t)}else{if(s.ismac&&s.u.indexOf('MSIE 4')>=0)r=s[b](a);else{s.eh(s.wd,'onerror',0,o);r=s[f](a);s.eh(s.wd,'onerror',1)}}return r};s.gtfset=function(e){var s=th"
		+"is;return s.tfs};s.gtfsoe=new Function('e','var s=s_c_il['+s._in+'],c;s.eh(window,\"onerror\",1);s.etfs=1;c=s.t();if(c)s.d.write(c);s.etfs=0;return true');s.gtfsfb=function(a){return window};s.gtfs"
		+"f=function(w){var s=this,p=w.parent,l=w.location;s.tfs=w;if(p&&p.location!=l&&p.location.host==l.host){s.tfs=p;return s.gtfsf(s.tfs)}return s.tfs};s.gtfs=function(){var s=this;if(!s.tfs){s.tfs=s.wd"
		+";if(!s.etfs)s.tfs=s.cet('gtfsf',s.tfs,'gtfset',s.gtfsoe,'gtfsfb')}return s.tfs};s.mrq=function(u){var s=this,l=s.rl[u],n,r;s.rl[u]=0;if(l)for(n=0;n<l.length;n++){r=l[n];s.mr(0,0,r.r,0,r.t,r.u)}};s."
		+"br=function(id,rs){var s=this;if(s.disableBufferedRequests||!s.c_w('s_br',rs))s.brl=rs};s.flushBufferedRequests=function(){this.fbr(0)};s.fbr=function(id){var s=this,br=s.c_r('s_br');if(!br)br=s.br"
		+"l;if(br){if(!s.disableBufferedRequests)s.c_w('s_br','');s.mr(0,0,br)}s.brl=0};s.mr=function(sess,q,rs,id,ta,u){var s=this,dc=s.dc,t1=s.trackingServer,t2=s.trackingServerSecure,tb=s.trackingServerBa"
		+"se,p='.sc',ns=s.visitorNamespace,un=s.cls(u?u:(ns?ns:s.fun)),r=new Object,l,imn='s_i_'+(un),im,b,e;if(!rs){if(t1){if(t2&&s.ssl)t1=t2}else{if(!tb)tb='2o7.net';if(dc)dc=(''+dc).toLowerCase();else dc="
		+"'d1';if(tb=='2o7.net'){if(dc=='d1')dc='112';else if(dc=='d2')dc='122';p=''}t1=un+'.'+dc+'.'+p+tb}rs='http'+(s.ssl?'s':'')+'://'+t1+'/b/ss/'+s.un+'/'+(s.mobile?'5.1':'1')+'/H.21/'+sess+'?AQB=1&ndh=1"
		+"'+(q?q:'')+'&AQE=1';if(s.isie&&!s.ismac){if(s.apv>5.5)rs=s.fl(rs,4095);else rs=s.fl(rs,2047)}if(id){s.br(id,rs);return}}if(s.d.images&&s.apv>=3&&(!s.isopera||s.apv>=7)&&(s.ns6<0||s.apv>=6.1)){if(!s"
		+".rc)s.rc=new Object;if(!s.rc[un]){s.rc[un]=1;if(!s.rl)s.rl=new Object;s.rl[un]=new Array;setTimeout('if(window.s_c_il)window.s_c_il['+s._in+'].mrq(\"'+un+'\")',750)}else{l=s.rl[un];if(l){r.t=ta;r.u"
		+"=un;r.r=rs;l[l.length]=r;return ''}imn+='_'+s.rc[un];s.rc[un]++}im=s.wd[imn];if(!im)im=s.wd[imn]=new Image;im.s_l=0;im.onload=new Function('e','this.s_l=1;var wd=window,s;if(wd.s_c_il){s=wd.s_c_il["
		+"'+s._in+'];s.mrq(\"'+un+'\");s.nrs--;if(!s.nrs)s.m_m(\"rr\")}');if(!s.nrs){s.nrs=1;s.m_m('rs')}else s.nrs++;im.src=rs;if(rs.indexOf('&pe=')>=0&&(!ta||ta=='_self'||ta=='_top'||(s.wd.name&&ta==s.wd.n"
		+"ame))){b=e=new Date;while(!im.s_l&&e.getTime()-b.getTime()<500)e=new Date}return ''}return '<im'+'g sr'+'c=\"'+rs+'\" width=1 height=1 border=0 alt=\"\">'};s.gg=function(v){var s=this;if(!s.wd['s_'"
		+"+v])s.wd['s_'+v]='';return s.wd['s_'+v]};s.glf=function(t,a){if(t.substring(0,2)=='s_')t=t.substring(2);var s=this,v=s.gg(t);if(v)s[t]=v};s.gl=function(v){var s=this;if(s.pg)s.pt(v,',','glf',0)};s."
		+"rf=function(x){var s=this,y,i,j,h,l,a,b='',c='',t;if(x){y=''+x;i=y.indexOf('?');if(i>0){a=y.substring(i+1);y=y.substring(0,i);h=y.toLowerCase();i=0;if(h.substring(0,7)=='http://')i+=7;else if(h.sub"
		+"string(0,8)=='https://')i+=8;h=h.substring(i);i=h.indexOf(\"/\");if(i>0){h=h.substring(0,i);if(h.indexOf('google')>=0){a=s.sp(a,'&');if(a.length>1){l=',q,ie,start,search_key,word,kw,cd,';for(j=0;j<"
		+"a.length;j++){t=a[j];i=t.indexOf('=');if(i>0&&l.indexOf(','+t.substring(0,i)+',')>=0)b+=(b?'&':'')+t;else c+=(c?'&':'')+t}if(b&&c){y+='?'+b+'&'+c;if(''+x!=y)x=y}}}}}}return x};s.hav=function(){var "
		+"s=this,qs='',fv=s.linkTrackVars,fe=s.linkTrackEvents,mn,i;if(s.pe){mn=s.pe.substring(0,1).toUpperCase()+s.pe.substring(1);if(s[mn]){fv=s[mn].trackVars;fe=s[mn].trackEvents}}fv=fv?fv+','+s.vl_l+','+"
		+"s.vl_l2:'';for(i=0;i<s.va_t.length;i++){var k=s.va_t[i],v=s[k],b=k.substring(0,4),x=k.substring(4),n=parseInt(x),q=k;if(v&&k!='linkName'&&k!='linkType'){if(s.pe||s.lnk||s.eo){if(fv&&(','+fv+',').in"
		+"dexOf(','+k+',')<0)v='';if(k=='events'&&fe)v=s.fs(v,fe)}if(v){if(k=='dynamicVariablePrefix')q='D';else if(k=='visitorID')q='vid';else if(k=='pageURL'){q='g';v=s.fl(v,255)}else if(k=='referrer'){q='"
		+"r';v=s.fl(s.rf(v),255)}else if(k=='vmk'||k=='visitorMigrationKey')q='vmt';else if(k=='visitorMigrationServer'){q='vmf';if(s.ssl&&s.visitorMigrationServerSecure)v=''}else if(k=='visitorMigrationServ"
		+"erSecure'){q='vmf';if(!s.ssl&&s.visitorMigrationServer)v=''}else if(k=='charSet'){q='ce';if(v.toUpperCase()=='AUTO')v='ISO8859-1';else if(s.em==2)v='UTF-8'}else if(k=='visitorNamespace')q='ns';else"
		+" if(k=='cookieDomainPeriods')q='cdp';else if(k=='cookieLifetime')q='cl';else if(k=='variableProvider')q='vvp';else if(k=='currencyCode')q='cc';else if(k=='channel')q='ch';else if(k=='transactionID'"
		+")q='xact';else if(k=='campaign')q='v0';else if(k=='resolution')q='s';else if(k=='colorDepth')q='c';else if(k=='javascriptVersion')q='j';else if(k=='javaEnabled')q='v';else if(k=='cookiesEnabled')q="
		+"'k';else if(k=='browserWidth')q='bw';else if(k=='browserHeight')q='bh';else if(k=='connectionType')q='ct';else if(k=='homepage')q='hp';else if(k=='plugins')q='p';else if(s.num(x)){if(b=='prop')q='c"
		+"'+n;else if(b=='eVar')q='v'+n;else if(b=='list')q='l'+n;else if(b=='hier'){q='h'+n;v=s.fl(v,255)}}if(v)qs+='&'+q+'='+(k.substring(0,3)!='pev'?s.ape(v):v)}}}return qs};s.ltdf=function(t,h){t=t?t.toL"
		+"owerCase():'';h=h?h.toLowerCase():'';var qi=h.indexOf('?');h=qi>=0?h.substring(0,qi):h;if(t&&h.substring(h.length-(t.length+1))=='.'+t)return 1;return 0};s.ltef=function(t,h){t=t?t.toLowerCase():''"
		+";h=h?h.toLowerCase():'';if(t&&h.indexOf(t)>=0)return 1;return 0};s.lt=function(h){var s=this,lft=s.linkDownloadFileTypes,lef=s.linkExternalFilters,lif=s.linkInternalFilters;lif=lif?lif:s.wd.locatio"
		+"n.hostname;h=h.toLowerCase();if(s.trackDownloadLinks&&lft&&s.pt(lft,',','ltdf',h))return 'd';if(s.trackExternalLinks&&h.substring(0,1)!='#'&&(lef||lif)&&(!lef||s.pt(lef,',','ltef',h))&&(!lif||!s.pt"
		+"(lif,',','ltef',h)))return 'e';return ''};s.lc=new Function('e','var s=s_c_il['+s._in+'],b=s.eh(this,\"onclick\");s.lnk=s.co(this);s.t();s.lnk=0;if(b)return this[b](e);return true');s.bc=new Functi"
		+"on('e','var s=s_c_il['+s._in+'],f,tcf;if(s.d&&s.d.all&&s.d.all.cppXYctnr)return;s.eo=e.srcElement?e.srcElement:e.target;tcf=new Function(\"s\",\"var e;try{if(s.eo&&(s.eo.tagName||s.eo.parentElement"
		+"||s.eo.parentNode))s.t()}catch(e){}\");tcf(s);s.eo=0');s.oh=function(o){var s=this,l=s.wd.location,h=o.href?o.href:'',i,j,k,p;i=h.indexOf(':');j=h.indexOf('?');k=h.indexOf('/');if(h&&(i<0||(j>=0&&i"
		+">j)||(k>=0&&i>k))){p=o.protocol&&o.protocol.length>1?o.protocol:(l.protocol?l.protocol:'');i=l.pathname.lastIndexOf('/');h=(p?p+'//':'')+(o.host?o.host:(l.host?l.host:''))+(h.substring(0,1)!='/'?l."
		+"pathname.substring(0,i<0?0:i)+'/':'')+h}return h};s.ot=function(o){var t=o.tagName;t=t&&t.toUpperCase?t.toUpperCase():'';if(t=='SHAPE')t='';if(t){if((t=='INPUT'||t=='BUTTON')&&o.type&&o.type.toUppe"
		+"rCase)t=o.type.toUpperCase();else if(!t&&o.href)t='A';}return t};s.oid=function(o){var s=this,t=s.ot(o),p,c,n='',x=0;if(t&&!o.s_oid){p=o.protocol;c=o.onclick;if(o.href&&(t=='A'||t=='AREA')&&(!c||!p"
		+"||p.toLowerCase().indexOf('javascript')<0))n=s.oh(o);else if(c){n=s.rep(s.rep(s.rep(s.rep(''+c,\"\\r\",''),\"\\n\",''),\"\\t\",''),' ','');x=2}else if(t=='INPUT'||t=='SUBMIT'){if(o.value)n=o.value;"
		+"else if(o.innerText)n=o.innerText;else if(o.textContent)n=o.textContent;x=3}else if(o.src&&t=='IMAGE')n=o.src;if(n){o.s_oid=s.fl(n,100);o.s_oidt=x}}return o.s_oid};s.rqf=function(t,un){var s=this,e"
		+"=t.indexOf('='),u=e>=0?','+t.substring(0,e)+',':'';return u&&u.indexOf(','+un+',')>=0?s.epa(t.substring(e+1)):''};s.rq=function(un){var s=this,c=un.indexOf(','),v=s.c_r('s_sq'),q='';if(c<0)return s"
		+".pt(v,'&','rqf',un);return s.pt(un,',','rq',0)};s.sqp=function(t,a){var s=this,e=t.indexOf('='),q=e<0?'':s.epa(t.substring(e+1));s.sqq[q]='';if(e>=0)s.pt(t.substring(0,e),',','sqs',q);return 0};s.s"
		+"qs=function(un,q){var s=this;s.squ[un]=q;return 0};s.sq=function(q){var s=this,k='s_sq',v=s.c_r(k),x,c=0;s.sqq=new Object;s.squ=new Object;s.sqq[q]='';s.pt(v,'&','sqp',0);s.pt(s.un,',','sqs',q);v='"
		+"';for(x in s.squ)if(x&&(!Object||!Object.prototype||!Object.prototype[x]))s.sqq[s.squ[x]]+=(s.sqq[s.squ[x]]?',':'')+x;for(x in s.sqq)if(x&&(!Object||!Object.prototype||!Object.prototype[x])&&s.sqq["
		+"x]&&(x==q||c<2)){v+=(v?'&':'')+s.sqq[x]+'='+s.ape(x);c++}return s.c_w(k,v,0)};s.wdl=new Function('e','var s=s_c_il['+s._in+'],r=true,b=s.eh(s.wd,\"onload\"),i,o,oc;if(b)r=this[b](e);for(i=0;i<s.d.l"
		+"inks.length;i++){o=s.d.links[i];oc=o.onclick?\"\"+o.onclick:\"\";if((oc.indexOf(\"s_gs(\")<0||oc.indexOf(\".s_oc(\")>=0)&&oc.indexOf(\".tl(\")<0)s.eh(o,\"onclick\",0,s.lc);}return r');s.wds=functio"
		+"n(){var s=this;if(s.apv>3&&(!s.isie||!s.ismac||s.apv>=5)){if(s.b&&s.b.attachEvent)s.b.attachEvent('onclick',s.bc);else if(s.b&&s.b.addEventListener)s.b.addEventListener('click',s.bc,false);else s.e"
		+"h(s.wd,'onload',0,s.wdl)}};s.vs=function(x){var s=this,v=s.visitorSampling,g=s.visitorSamplingGroup,k='s_vsn_'+s.un+(g?'_'+g:''),n=s.c_r(k),e=new Date,y=e.getYear();e.setYear(y+10+(y<1900?1900:0));"
		+"if(v){v*=100;if(!n){if(!s.c_w(k,x,e))return 0;n=x}if(n%10000>v)return 0}return 1};s.dyasmf=function(t,m){if(t&&m&&m.indexOf(t)>=0)return 1;return 0};s.dyasf=function(t,m){var s=this,i=t?t.indexOf('"
		+"='):-1,n,x;if(i>=0&&m){var n=t.substring(0,i),x=t.substring(i+1);if(s.pt(x,',','dyasmf',m))return n}return 0};s.uns=function(){var s=this,x=s.dynamicAccountSelection,l=s.dynamicAccountList,m=s.dyna"
		+"micAccountMatch,n,i;s.un=s.un.toLowerCase();if(x&&l){if(!m)m=s.wd.location.host;if(!m.toLowerCase)m=''+m;l=l.toLowerCase();m=m.toLowerCase();n=s.pt(l,';','dyasf',m);if(n)s.un=n}i=s.un.indexOf(',');"
		+"s.fun=i<0?s.un:s.un.substring(0,i)};s.sa=function(un){var s=this;s.un=un;if(!s.oun)s.oun=un;else if((','+s.oun+',').indexOf(','+un+',')<0)s.oun+=','+un;s.uns()};s.m_i=function(n,a){var s=this,m,f=n"
		+".substring(0,1),r,l,i;if(!s.m_l)s.m_l=new Object;if(!s.m_nl)s.m_nl=new Array;m=s.m_l[n];if(!a&&m&&m._e&&!m._i)s.m_a(n);if(!m){m=new Object,m._c='s_m';m._in=s.wd.s_c_in;m._il=s._il;m._il[m._in]=m;s."
		+"wd.s_c_in++;m.s=s;m._n=n;m._l=new Array('_c','_in','_il','_i','_e','_d','_dl','s','n','_r','_g','_g1','_t','_t1','_x','_x1','_rs','_rr','_l');s.m_l[n]=m;s.m_nl[s.m_nl.length]=n}else if(m._r&&!m._m)"
		+"{r=m._r;r._m=m;l=m._l;for(i=0;i<l.length;i++)if(m[l[i]])r[l[i]]=m[l[i]];r._il[r._in]=r;m=s.m_l[n]=r}if(f==f.toUpperCase())s[n]=m;return m};s.m_a=new Function('n','g','e','if(!g)g=\"m_\"+n;var s=s_c"
		+"_il['+s._in+'],c=s[g+\"_c\"],m,x,f=0;if(!c)c=s.wd[\"s_\"+g+\"_c\"];if(c&&s_d)s[g]=new Function(\"s\",s_ft(s_d(c)));x=s[g];if(!x)x=s.wd[\\'s_\\'+g];if(!x)x=s.wd[g];m=s.m_i(n,1);if(x&&(!m._i||g!=\"m_"
		+"\"+n)){m._i=f=1;if((\"\"+x).indexOf(\"function\")>=0)x(s);else s.m_m(\"x\",n,x,e)}m=s.m_i(n,1);if(m._dl)m._dl=m._d=0;s.dlt();return f');s.m_m=function(t,n,d,e){t='_'+t;var s=this,i,x,m,f='_'+t,r=0,"
		+"u;if(s.m_l&&s.m_nl)for(i=0;i<s.m_nl.length;i++){x=s.m_nl[i];if(!n||x==n){m=s.m_i(x);u=m[t];if(u){if((''+u).indexOf('function')>=0){if(d&&e)u=m[t](d,e);else if(d)u=m[t](d);else u=m[t]()}}if(u)r=1;u="
		+"m[t+1];if(u&&!m[f]){if((''+u).indexOf('function')>=0){if(d&&e)u=m[t+1](d,e);else if(d)u=m[t+1](d);else u=m[t+1]()}}m[f]=1;if(u)r=1}}return r};s.m_ll=function(){var s=this,g=s.m_dl,i,o;if(g)for(i=0;"
		+"i<g.length;i++){o=g[i];if(o)s.loadModule(o.n,o.u,o.d,o.l,o.e,1);g[i]=0}};s.loadModule=function(n,u,d,l,e,ln){var s=this,m=0,i,g,o=0,f1,f2,c=s.h?s.h:s.b,b,tcf;if(n){i=n.indexOf(':');if(i>=0){g=n.sub"
		+"string(i+1);n=n.substring(0,i)}else g=\"m_\"+n;m=s.m_i(n)}if((l||(n&&!s.m_a(n,g)))&&u&&s.d&&c&&s.d.createElement){if(d){m._d=1;m._dl=1}if(ln){if(s.ssl)u=s.rep(u,'http:','https:');i='s_s:'+s._in+':'"
		+"+n+':'+g;b='var s=s_c_il['+s._in+'],o=s.d.getElementById(\"'+i+'\");if(s&&o){if(!o.l&&s.wd.'+g+'){o.l=1;if(o.i)clearTimeout(o.i);o.i=0;s.m_a(\"'+n+'\",\"'+g+'\"'+(e?',\"'+e+'\"':'')+')}';f2=b+'o.c+"
		+"+;if(!s.maxDelay)s.maxDelay=250;if(!o.l&&o.c<(s.maxDelay*2)/100)o.i=setTimeout(o.f2,100)}';f1=new Function('e',b+'}');tcf=new Function('s','c','i','u','f1','f2','var e,o=0;try{o=s.d.createElement("
		+"\"script\");if(o){o.type=\"text/javascript\";'+(n?'o.id=i;o.defer=true;o.onload=o.onreadystatechange=f1;o.f2=f2;o.l=0;':'')+'o.src=u;c.appendChild(o);'+(n?'o.c=0;o.i=setTimeout(f2,100)':'')+'}}catc"
		+"h(e){o=0}return o');o=tcf(s,c,i,u,f1,f2)}else{o=new Object;o.n=n+':'+g;o.u=u;o.d=d;o.l=l;o.e=e;g=s.m_dl;if(!g)g=s.m_dl=new Array;i=0;while(i<g.length&&g[i])i++;g[i]=o}}else if(n){m=s.m_i(n);m._e=1}"
		+"return m};s.vo1=function(t,a){if(a[t]||a['!'+t])this[t]=a[t]};s.vo2=function(t,a){if(!a[t]){a[t]=this[t];if(!a[t])a['!'+t]=1}};s.dlt=new Function('var s=s_c_il['+s._in+'],d=new Date,i,vo,f=0;if(s.d"
		+"ll)for(i=0;i<s.dll.length;i++){vo=s.dll[i];if(vo){if(!s.m_m(\"d\")||d.getTime()-vo._t>=s.maxDelay){s.dll[i]=0;s.t(vo)}else f=1}}if(s.dli)clearTimeout(s.dli);s.dli=0;if(f){if(!s.dli)s.dli=setTimeout"
		+"(s.dlt,s.maxDelay)}else s.dll=0');s.dl=function(vo){var s=this,d=new Date;if(!vo)vo=new Object;s.pt(s.vl_g,',','vo2',vo);vo._t=d.getTime();if(!s.dll)s.dll=new Array;s.dll[s.dll.length]=vo;if(!s.max"
		+"Delay)s.maxDelay=250;s.dlt()};s.t=function(vo,id){var s=this,trk=1,tm=new Date,sed=Math&&Math.random?Math.floor(Math.random()*10000000000000):tm.getTime(),sess='s'+Math.floor(tm.getTime()/10800000)"
		+"%10+sed,y=tm.getYear(),vt=tm.getDate()+'/'+tm.getMonth()+'/'+(y<1900?y+1900:y)+' '+tm.getHours()+':'+tm.getMinutes()+':'+tm.getSeconds()+' '+tm.getDay()+' '+tm.getTimezoneOffset(),tcf,tfs=s.gtfs(),"
		+"ta='',q='',qs='',code='',vb=new Object;s.gl(s.vl_g);s.uns();s.m_ll();if(!s.td){var tl=tfs.location,a,o,i,x='',c='',v='',p='',bw='',bh='',j='1.0',k=s.c_w('s_cc','true',0)?'Y':'N',hp='',ct='',pn=0,ps"
		+";if(String&&String.prototype){j='1.1';if(j.match){j='1.2';if(tm.setUTCDate){j='1.3';if(s.isie&&s.ismac&&s.apv>=5)j='1.4';if(pn.toPrecision){j='1.5';a=new Array;if(a.forEach){j='1.6';i=0;o=new Objec"
		+"t;tcf=new Function('o','var e,i=0;try{i=new Iterator(o)}catch(e){}return i');i=tcf(o);if(i&&i.next)j='1.7'}}}}}if(s.apv>=4)x=screen.width+'x'+screen.height;if(s.isns||s.isopera){if(s.apv>=3){v=s.n."
		+"javaEnabled()?'Y':'N';if(s.apv>=4){c=screen.pixelDepth;bw=s.wd.innerWidth;bh=s.wd.innerHeight}}s.pl=s.n.plugins}else if(s.isie){if(s.apv>=4){v=s.n.javaEnabled()?'Y':'N';c=screen.colorDepth;if(s.apv"
		+">=5){bw=s.d.documentElement.offsetWidth;bh=s.d.documentElement.offsetHeight;if(!s.ismac&&s.b){tcf=new Function('s','tl','var e,hp=0;try{s.b.addBehavior(\"#default#homePage\");hp=s.b.isHomePage(tl)?"
		+"\"Y\":\"N\"}catch(e){}return hp');hp=tcf(s,tl);tcf=new Function('s','var e,ct=0;try{s.b.addBehavior(\"#default#clientCaps\");ct=s.b.connectionType}catch(e){}return ct');ct=tcf(s)}}}else r=''}if(s.p"
		+"l)while(pn<s.pl.length&&pn<30){ps=s.fl(s.pl[pn].name,100)+';';if(p.indexOf(ps)<0)p+=ps;pn++}s.resolution=x;s.colorDepth=c;s.javascriptVersion=j;s.javaEnabled=v;s.cookiesEnabled=k;s.browserWidth=bw;"
		+"s.browserHeight=bh;s.connectionType=ct;s.homepage=hp;s.plugins=p;s.td=1}if(vo){s.pt(s.vl_g,',','vo2',vb);s.pt(s.vl_g,',','vo1',vo)}if(s.usePlugins)s.doPlugins(s);var l=s.wd.location,r=tfs.document."
		+"referrer;if(!s.pageURL)s.pageURL=l.href?l.href:l;if(!s.referrer&&!s._1_referrer){s.referrer=r;s._1_referrer=1}if((vo&&vo._t)||!s.m_m('d')){s.m_m('g');if(s.lnk||s.eo){var o=s.eo?s.eo:s.lnk;if(!o)ret"
		+"urn '';var p=s.pageName,w=1,t=s.ot(o),n=s.oid(o),x=o.s_oidt,h,l,i,oc;if(s.eo&&o==s.eo){while(o&&!n&&t!='BODY'){o=o.parentElement?o.parentElement:o.parentNode;if(!o)return '';t=s.ot(o);n=s.oid(o);x="
		+"o.s_oidt}oc=o.onclick?''+o.onclick:'';if((oc.indexOf(\"s_gs(\")>=0&&oc.indexOf(\".s_oc(\")<0)||oc.indexOf(\".tl(\")>=0)return ''}ta=n?o.target:1;h=s.oh(o);i=h.indexOf('?');h=s.linkLeaveQueryString|"
		+"|i<0?h:h.substring(0,i);l=s.linkName;t=s.linkType?s.linkType.toLowerCase():s.lt(h);if(t&&(h||l))q+='&pe=lnk_'+(t=='d'||t=='e'?s.ape(t):'o')+(h?'&pev1='+s.ape(h):'')+(l?'&pev2='+s.ape(l):'');else tr"
		+"k=0;if(s.trackInlineStats){if(!p){p=s.pageURL;w=0}t=s.ot(o);i=o.sourceIndex;if(s.gg('objectID')){n=s.gg('objectID');x=1;i=1}if(p&&n&&t)qs='&pid='+s.ape(s.fl(p,255))+(w?'&pidt='+w:'')+'&oid='+s.ape("
		+"s.fl(n,100))+(x?'&oidt='+x:'')+'&ot='+s.ape(t)+(i?'&oi='+i:'')}}if(!trk&&!qs)return '';s.sampled=s.vs(sed);if(trk){if(s.sampled)code=s.mr(sess,(vt?'&t='+s.ape(vt):'')+s.hav()+q+(qs?qs:s.rq(s.un)),0"
		+",id,ta);qs='';s.m_m('t');if(s.p_r)s.p_r();s.referrer=''}s.sq(qs);}else{s.dl(vo);}if(vo)s.pt(s.vl_g,',','vo1',vb);s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3='';"
		+"if(s.pg)s.wd.s_lnk=s.wd.s_eo=s.wd.s_linkName=s.wd.s_linkType='';if(!id&&!s.tc){s.tc=1;s.flushBufferedRequests()}return code};s.tl=function(o,t,n,vo){var s=this;s.lnk=s.co(o);s.linkType=t;s.linkName"
		+"=n;s.t(vo)};if(pg){s.wd.s_co=function(o){var s=s_gi(\"_\",1,1);return s.co(o)};s.wd.s_gs=function(un){var s=s_gi(un,1,1);return s.t()};s.wd.s_dc=function(un){var s=s_gi(un,1);return s.t()}}s.ssl=(s"
		+".wd.location.protocol.toLowerCase().indexOf('https')>=0);s.d=document;s.b=s.d.body;if(s.d.getElementsByTagName){s.h=s.d.getElementsByTagName('HEAD');if(s.h)s.h=s.h[0]}s.n=navigator;s.u=s.n.userAgen"
		+"t;s.ns6=s.u.indexOf('Netscape6/');var apn=s.n.appName,v=s.n.appVersion,ie=v.indexOf('MSIE '),o=s.u.indexOf('Opera '),i;if(v.indexOf('Opera')>=0||o>0)apn='Opera';s.isie=(apn=='Microsoft Internet Exp"
		+"lorer');s.isns=(apn=='Netscape');s.isopera=(apn=='Opera');s.ismac=(s.u.indexOf('Mac')>=0);if(o>0)s.apv=parseFloat(s.u.substring(o+6));else if(ie>0){s.apv=parseInt(i=v.substring(ie+5));if(s.apv>3)s."
		+"apv=parseFloat(i)}else if(s.ns6>0)s.apv=parseFloat(s.u.substring(s.ns6+10));else s.apv=parseFloat(v);s.em=0;if(String.fromCharCode){i=escape(String.fromCharCode(256)).toUpperCase();s.em=(i=='%C4%80"
		+"'?2:(i=='%U0100'?1:0))}s.sa(un);s.vl_l='dynamicVariablePrefix,visitorID,vmk,visitorMigrationKey,visitorMigrationServer,visitorMigrationServerSecure,ppu,charSet,visitorNamespace,cookieDomainPeriods,"
		+"cookieLifetime,pageName,pageURL,referrer,currencyCode';s.va_l=s.sp(s.vl_l,',');s.vl_t=s.vl_l+',variableProvider,channel,server,pageType,transactionID,purchaseID,campaign,state,zip,events,products,l"
		+"inkName,linkType';for(var n=1;n<51;n++)s.vl_t+=',prop'+n+',eVar'+n+',hier'+n+',list'+n;s.vl_l2=',tnt,pe,pev1,pev2,pev3,resolution,colorDepth,javascriptVersion,javaEnabled,cookiesEnabled,browserWidt"
		+"h,browserHeight,connectionType,homepage,plugins';s.vl_t+=s.vl_l2;s.va_t=s.sp(s.vl_t,',');s.vl_g=s.vl_t+',trackingServer,trackingServerSecure,trackingServerBase,fpCookieDomainPeriods,disableBuffered"
		+"Requests,mobile,visitorSampling,visitorSamplingGroup,dynamicAccountSelection,dynamicAccountList,dynamicAccountMatch,trackDownloadLinks,trackExternalLinks,trackInlineStats,linkLeaveQueryString,linkD"
		+"ownloadFileTypes,linkExternalFilters,linkInternalFilters,linkTrackVars,linkTrackEvents,linkNames,lnk,eo,_1_referrer';s.va_g=s.sp(s.vl_g,',');s.pg=pg;s.gl(s.vl_g);if(!ss)s.wds()",
		w=window,l=w.s_c_il,n=navigator,u=n.userAgent,v=n.appVersion,e=v.indexOf('MSIE '),m=u.indexOf('Netscape6/'),a,i,s;if(un){un=un.toLowerCase();if(l)for(i=0;i<l.length;i++){s=l[i];if(!s._c||s._c=='s_c'){if(s.oun==un)return s;else if(s.fs&&s.sa&&s.fs(s.oun,un)){s.sa(un);return s}}}}w.s_an='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
		w.s_sp=new Function("x","d","var a=new Array,i=0,j;if(x){if(x.split)a=x.split(d);else if(!d)for(i=0;i<x.length;i++)a[a.length]=x.substring(i,i+1);else while(i>=0){j=x.indexOf(d,i);a[a.length]=x.subst"
		+"ring(i,j<0?x.length:j);i=j;if(i>=0)i+=d.length}}return a");
		w.s_jn=new Function("a","d","var x='',i,j=a.length;if(a&&j>0){x=a[0];if(j>1){if(a.join)x=a.join(d);else for(i=1;i<j;i++)x+=d+a[i]}}return x");
		w.s_rep=new Function("x","o","n","return s_jn(s_sp(x,o),n)");
		w.s_d=new Function("x","var t='`^@$#',l=s_an,l2=new Object,x2,d,b=0,k,i=x.lastIndexOf('~~'),j,v,w;if(i>0){d=x.substring(0,i);x=x.substring(i+2);l=s_sp(l,'');for(i=0;i<62;i++)l2[l[i]]=i;t=s_sp(t,'');d"
		+"=s_sp(d,'~');i=0;while(i<5){v=0;if(x.indexOf(t[i])>=0) {x2=s_sp(x,t[i]);for(j=1;j<x2.length;j++){k=x2[j].substring(0,1);w=t[i]+k;if(k!=' '){v=1;w=d[b+l2[k]]}x2[j]=w+x2[j].substring(1)}}if(v)x=s_jn("
		+"x2,'');else{w=t[i]+' ';if(x.indexOf(w)>=0)x=s_rep(x,w,t[i]);i++;b+=62}}}return x");
		w.s_fe=new Function("c","return s_rep(s_rep(s_rep(c,'\\\\','\\\\\\\\'),'\"','\\\\\"'),\"\\n\",\"\\\\n\")");
		w.s_fa=new Function("f","var s=f.indexOf('(')+1,e=f.indexOf(')'),a='',c;while(s>=0&&s<e){c=f.substring(s,s+1);if(c==',')a+='\",\"';else if((\"\\n\\r\\t \").indexOf(c)<0)a+=c;s++}return a?'\"'+a+'\"':"
		+"a");
		w.s_ft=new Function("c","c+='';var s,e,o,a,d,q,f,h,x;s=c.indexOf('=function(');while(s>=0){s++;d=1;q='';x=0;f=c.substring(s);a=s_fa(f);e=o=c.indexOf('{',s);e++;while(d>0){h=c.substring(e,e+1);if(q){i"
		+"f(h==q&&!x)q='';if(h=='\\\\')x=x?0:1;else x=0}else{if(h=='\"'||h==\"'\")q=h;if(h=='{')d++;if(h=='}')d--}if(d>0)e++}c=c.substring(0,s)+'new Function('+(a?a+',':'')+'\"'+s_fe(c.substring(o+1,e))+'\")"
		+"'+c.substring(e+1);s=c.indexOf('=function(')}return c;");
		c=s_d(c);if(e>0){a=parseInt(i=v.substring(e+5));if(a>3)a=parseFloat(i)}else if(m>0)a=parseFloat(u.substring(m+10));else a=parseFloat(v);if(a>=5&&v.indexOf('Opera')<0&&u.indexOf('Opera')<0){w.s_c=new Function("un","pg","ss","var s=this;"+c);return new s_c(un,pg,ss)}else s=new Function("un","pg","ss","var s=new Object;"+s_ft(c)+";return s");return s(un,pg,ss)}

		// devolvemos el objeto con todos los parametros de configuracion
		return s;
	},

	/**
	 * Metodo para filtrar que evento predeterminado(se envian al cargar la pagina) hay que pasar para lanzar
	 */
	standardEvents: function(key,value){
		switch(this.pageName){
			// Evento para detalle de producto
			case 'fittingroom':
				var event='prodView';break;
			// Evento para confirmacion de pedido
			case 'confirmation':
				var event='purchase';break;
			// Evento para seccion de trailer
			case 'trailer':
				var event='event1';break;
			case 'summary':
				var event='scOpen';break;
			case 'mobile':
				var event='event49';break;
			default:
				var event='';break;
		}

		return event;
	},

	/**
	 * Metodo para enviar el evento que se ha recibido(anchor)
	 */
	processEvents: function(anchor){
		/*// codigo para vaciar las variables ya enviadas
		void(this.sObject.tl());*/

		// se definen que valores se van a enviar y de que tipo
		this.sObject.linkTrackEvents=anchor;
		this.sObject.linkTrackVars="events";

		// asociamos al evento con la variable de eventos de omniture s.events(this.sObject corresponde al objeto s)
		this.sObject.events=anchor;

		// enviamos el evento a traves del metodo tl()
		this.sObject.tl(this,'o');
	},

	/**
	 * Metodo para enviar los eventos de error que se disparan automaticamente
	 */
	processErrorEvents: function(anchor){
		/*// codigo para vaciar las variables ya enviadas
		void(this.sObject.tl());*/
		// se definen que valores se van a enviar y de que tipo
		this.sObject.linkTrackEvents=anchor;
		this.sObject.linkTrackVars="events";
		// asociamos al evento con la variable de eventos de omniture s.events(this.sObject corresponde al objeto s)
		this.sObject.events=anchor;
		// enviamos el evento a traves del metodo tl()
		// sustituyendo this por true, le decimos que haga un envio con un delay de 500ms
		this.sObject.tl(true,'o', anchor);
	},

	/**
	 * Metodo para enviar los mensajes de error detectados por Dark Guardian que se disparan automaticamente
	 */
	processErrorMsg: function(msg){
		// se definen que tipo valores se van a enviar
		this.sObject.linkTrackVars = "prop11";
		// asingamos el valor de la variable con el mensaje de error
		this.sObject.prop11 = msg;
		// enviamos el evento a traves del metodo tl()
		this.sObject.tl(this,'o',msg);
	},

	/**
	 * Metodo para enviar el evento click en los banners flash
	 */
	processBannerEvents: function(ban,id,name,size){
		// se definen que valores se van a enviar y de que tipo
		this.sObject.linkTrackEvents=ban;
		// se definen las variables a enviar (las que no esten aqui no se enviaran)
		this.sObject.linkTrackVars="events,eVar33,eVar35,eVar36";

		// nombre del banner (especificado en la id contenedora<div>)
		this.sObject.eVar33=name;
		// nombre de la creatividad utilizada en caso de que exista el mismo banner en diferentes formatos (CURRENTLY DISABLED!! :D)
		//this.sObject.eVar34="";
		// tamanyo del banner
		this.sObject.eVar35=size;
		// nombre de la pagina donde esta el banner
		this.sObject.eVar36=this.url_section;

		// asociamos al evento con la variable de eventos de omniture s.events(this.sObject corresponde al objeto s)
		this.sObject.events=ban;
		// comprueba que el elemento no tiene atributo href y le asigna dicha propiedad sin valor en el momento del evento click
		// sin afectar al html
		var linktrack = this.href!=null?this.sObject.linktrack(this.href):"";
		// si esta vacio envia
		if (linktrack == ""){
			this.sObject.tl(this,'o',id);
		}
	}


	/**
	 * Metodo para enviar el evento click en los elementos que NO son links<a>
	 */
	/*
	processEventsForNonAnchorTags: function(anchor){
		// se definen que valores se van a enviar y de que tipo
		this.sObject.linkTrackEvents=anchor;
		// se definen las variables a enviar (las que no esten aqui no se enviaran)
		this.sObject.linkTrackVars="events";
		console.log(anchor);
		// asociamos al evento con la variable de eventos de omniture s.events(this.sObject corresponde al objeto s)
		this.sObject.events=anchor;
		// comprueba que el elemento no tiene atributo href y le asigna dicha propiedad sin valor
		var lt=this.href!=null?this.sObject.lt(this.href):"";
		if (lt=="") { this.sObject.tl(this,'o');}
	}
	*/

});

var Analytics = new PrivaliaAnalytics();
/**
 *  privalia.banners.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 90-privalia.base.js
 * @revision: 	2.0
 */

/**
 * PrivaliaJsonBanners - Common
 * =========================================
 * @modified: 	Naiara		(11-07-11)
 */
var PrivaliaJsonBanners = Class.create(PrivaliaBase, {
	initialize: function($super, param) {
		$super();
		
		this.sTargetBanner = param;					//Id contenedor de la secion banners (param, se inicializa al instanciar el objeto)
 		this.id_arrows = "arrows";						//Id contenedor de los arrows de banners, microsites
 		this.bannerUniqueId = 0;						//Id del banner, dado por el bannerServer
 		this.imageUrl = '';								//Url a la imagen
 		this.linkUrl = '';								//link del banner
 		this.scriptUrl = '';							//url del script generado dinámicamente por el bannerserver
		//version
	   	this.version =				2.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaJsonBanners');
	},

	/**
	 * Banners - Construye la pagina con los datos pasados por json previamente
	 */
	buildPage: function(generate) {
			switch(generate) {	
				case 'footer_banners':
					//MICROSITES - INDEX
					var data = this.getResData();
					
					//Muestra la seccion de banners si existen
					if ( $(this.sTargetBanner) != null ) {
						this.showBanners(data, this.sTargetBanner);				
					
						//Muestra y oculta las arrows segun si es <=3 (oculto) o >3 (mostrar)
						this.showArrows(data);			
						
						this.generateHtml({
							pushData: this.pushBanners
						});	
							
						//Declaramos el slider de banners. El carousel debe de estar depues del push
						try{
							Event.observe(window,'load',function() {
								new Carousel($('slider-product-banners'), $$('#banners .banner'), $('banners').select('a.carousel-control'), slider_banners);
							});
						}
						catch(e) {
							DGuardian.log("privalia.banners.js - buildpage carousel", e);
						}
					
					}
					break;
				case 'embedded':
					
					this.loadExternalCode();
				
					break;
				
				default:
					
					this.generateHtml();
					break;
			}
	},

	
	/**
	 * obtener el id unico del banner
	 * @author: naiara
	 **/
	getBannerUniqueId: function(){
		return this.bannerUniqueId;
	},
	
	/**
	 * obtener la url de la imagen de la imagen
	 * @author: naiara
	 **/
	getImageUrl: function(){
		return this.imageUrl;
	},

	/**
	 * obtener la url del link del banner
	 * @author: naiara
	 **/
	getLinkUrl: function(){
		return this.linkUrl;
	},	

	
	/**
	 * setear el id unico del banner, 
	 * actualmente funciona con el id de la zona de OpenX
	 * @author: naiara
	 **/
	setBannerAreaId: function(sId){
		if (!isNaN(sId)){
			this.bannerUniqueId = sId;
		}
	},
	
	/**
	 * construir url para mostrar imagen del banner
	 * @author: naiara
	 **/
	setImageUrl: function(){
		
		   var sId = this.getBannerUniqueId();
		   var sImgUrl = '';
		   if (sId){
			   var sImgUrl = (location.protocol=='https:'?'https://bnr.privalia.com/delivery/avw.php':'http://bnr.privalia.com/delivery/avw.php');
	
			   sImgUrl = sImgUrl+'?zoneid='+sId+'&amp;cb=' + Math.floor(Math.random()*99999999999);
		   }
		   this.imageUrl = sImgUrl;			   
	},
	
	/**
	 * construir url para linkar el banner
	 * hay que utilizar este metodo solo si el banner que se va a mostrar lleva enlace
	 * si solo va a mostrar una imagen (sin link) no hace falta
	 * @author: naiara
	 **/
	setLinkUrl: function(){
		
		   var sId = this.getBannerUniqueId();

		   var sLinkUrl = '';
		   if (sId){
			   sLinkUrl = (location.protocol=='https:'?'https://bnr.privalia.com/delivery/ck.php':'http://bnr.privalia.com/delivery/ck.php');

			   sLinkUrl = sLinkUrl+'?zoneid='+sId+'&amp;cb=' + Math.floor(Math.random()*99999999999);
		   }
		   
		   this.linkUrl = sLinkUrl;
			   
	},	
	
	/**
	 * inserta el banner en el target especificado como una imagen
	 * @author: naiara
	 * @TODO: hacer que funcione con el script generado dinamicamente por OpenX
	 */
	insertBannerImage: function(){
		var sId;
		var sImgUrl;
		var sLinkUrl;
		var target;
		
		sId = this.getBannerUniqueId();
		if (sId!==null && sId!==undefined && sId!=='' && sId!==0){
			if ($(this.sTargetBanner)!==null){
				//se comprueba si tenemos la url de la imagen
				if (this.imageUrl===''){
					//si no la tenemos, la generamos
					this.setImageUrl();
				}
				sLinkUrl = this.getLinkUrl();
				
				if (sLinkUrl){
					//si se ha definido una url a la que linkar (mediante setLinkUrl), la imagen debe ir dentro de una etiqueta 'a'
					var link = new Element("a", {'href': sLinkUrl});
					$(this.sTargetBanner).insert({'bottom': link});
					target = link;
				}else{
					//si no la imagen se inserta directamente dentro del target especificado
					target = $(this.sTargetBanner);
				}
				
				sImgUrl = this.getImageUrl();
				
				//la imagen se inserta oculta hasta que cargue
				var image = new Element("img", {'src': sImgUrl, 'class': 'externalBanner', 'style': 'display: none'});
				target.insert({'bottom': image});
				
				//una vez cargada, se muestra
				Event.observe(image, 'load', (function(){
					image.show();
				}).bind(this), this);
				
			}else{
				DGuardian.log("privalia.banners.js - target div '#"+this.sTargetBanner+"' is missing");			
			}
		}else{
			DGuardian.log("privalia.banners.js - banner unique id is missing");		
		}
	},
	
	/**
	 * Mostrar banners
	 */
	showBanners: function (data, id) {
		//Si existe el objeto y banners
		if ( !Object.isUndefined(data.footer_banners) && (data.footer_banners.length != 0) && ($(id) != null)){
			$(id).removeClassName('hidden');
		}
	},
	
	/**
	 * Devuelve el volcado correspondiente a: Si url es vacio (cadena vacia) entonces muestra una capa diferente a si la url no es vacia
	 */
	showUrl: function(dataJson) {
		if( dataJson.url !== "") {
			// mostrar capa con enlace y ocultar capa sin enlace
			dataJson.showUrl = '';
			dataJson.hideUrl = 'hidden';		
		}
		else {
			// ocultar capa con enlace y mostrar solo titulo e imagen
			dataJson.showUrl = 'hidden';
			dataJson.hideUrl = '';
		}
		
		return dataJson;
	},
	
	/**
	 * Muestra y oculta las arrows segun si es <=3 (oculto) o >3 (mostrar)
	 */
	showArrows: function(dataJson) {
		if( (!Object.isUndefined(dataJson.footer_banners)) && (dataJson.footer_banners.length > 3) && ($(this.id_arrows) != null) ) {
			// mostrar arrows
			$(this.id_arrows).removeClassName('hidden');		
		}
	},
	
	/**
	 * Volcado de datos del bloque banners
	 */
	pushBanners: function (dataJson, index) {		
		
		// controlar si el banner tiene url
		dataJson = this.showUrl(dataJson);
		
		// sumo datos a volcar
		this.addBuilt(dataJson);
		
	}
	

});


/**
 * PrivaliaBanners - Common
 * =========================================
 * requieres: 	privaliaCore*, privaliaBase, PrivaliaJsonBanners
 * @modified: 	Cristina	(02-03-11)
 */
var PrivaliaBanners = new Class.create(PrivaliaJsonBanners, {
	initialize: function($super, param) {
		$super(param);
		
		 //version
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaBanners');
	}

});
/**
 *  privalia.carrierbasa.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 90-privalia.base.js
 * @revision: 	1.0
 */

/**
* PrivaliaCarrierBase - Common
* =========================================
* @modified:         Cristina        (17-12-10)
*/
var PrivaliaCarrierBase = Class.create(PrivaliaBase, {
   initialize: function($super){
       $super();

       this.b_secondaryCarrier =	false;							// Operador logistico secundario
       this.cssFirstCarrier =		'firstCarrier';		// Div's a ensenyar correspondiente al operador logsitico secundario
       this.cssSecondCarrier =		'secondaryCarrier';		// Div's a ensenyar correspondiente al operador logsitico secundario
       this.pageData =				'';								// Recoge el getData de la pagina cargada
       this.s_carrier =				'1';							// Operador logistico, por defecto MRW
       this.s_carrierName =			'carrier';						// nombre carrier
       this.s_page =				'';								// Definimos la pagina en la que nos encontramos
       this.s_url =					'/mycart/changeCarrier/';		// url a enviar los datos tanto si se ha elegido un punto de recogida como no
       
	     //version 
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaCarrierBase');

   },
	/**
	 * Oculta los bloques del primer operador y muestra los del segundo
	 */
	applyCarrierPage: function(){
	   $$('.'+ this.cssSecondCarrier).invoke('removeClassName', 'hidden'); 	// elimina hidden operador logsitico secundario
	   $$('.'+ this.cssFirstCarrier).invoke('addClassName', 'hidden'); 		// ocultar bloques operador logistico principal
	},
   /**
	 * Notificacion a la bbdd de cambio de operador logistico mediante ajax (envia un integer; por eje: 1 mrw, 3 kiala)
	 */
	callChangeCarrier: function (idCarrier, moreInfo) {
	   if(idCarrier != '') {
		   var url = this.s_url + this.s_carrierName + "/" + idCarrier;

		   // si se ha de enviar mas datos, lo concatenamos
		   if(!Object.isUndefined(moreInfo)) {
			   url += '/' + moreInfo;
		   }

		   	// enviamos el dato
		   new Ajax.Request(url, {
			   onComplete: function() {
			   		reloadSummary();
		   		}
		   });

	   }
	},

   /**
    * Comprueba si se debe habilitar mas operadores logisticos ademas del de por defecto
    */
   changeCarrier: function() {
	   // si el valor es true
	   if(this.b_secondaryCarrier){
		   // quitamos la clase hidden del modulo que contiene las opciones del operador logistico
			this.applyCarrierPage();
		}
   },
   /**
    * Obtiene el operador logistico
    */
   getCarrier: function () {
	   return this.s_carrier;
   },

   /**
    * Guarda el operador logistico
    */
   setCarrier: function (s_carrier) {
	   this.s_carrier = s_carrier;
   },
   /**
    * Guarda el operador logistico
    */
   setPage: function (s_page) {
	   this.s_page = s_page;
   }

});
/**
 * PrivaliaCountryBase - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 80-privalia.core.js

 * @modified:     Dani   (8-06-11)
 */
var PrivaliaCountryBase = Class.create(PrivaliaCoreErrors, {
	initialize: function($super, isoCountry){
		$super();
		
		this.b_co_register = 		false;			// permite activar o no el coregistro de Groupalia
		this.s_domain =				'';				// dominio "privalia.loc", "privalia.com", "privalia-test.com", etc.
		this.iso = 					isoCountry;
		this.s_keyAnalytics =		'';				// key del Google Analytics	
		this.s_keyGWO =				'UA-9766891-4';	// key del Google Website Optimizer (usamos una cuenta para todos los paises)
		this.b_logistic_carrier = 	false;			// permite utilizar mas operadores logisiticos si los hubiese
		this.b_offers_groupalia = 	false;			// ofertas de groupalia    
		this.b_oneclick_payment = 	false;			// compra en un click
		this.b_reopenOrder = 		true;			// habilitar el reabrir pedido
		this.service = 				true;			// selling service is active for this country
		this.bSocial = 				true;			// social module is active for this country
		this.sizeFilter = 			true;			// size filter is active for this country
		this.b_trackSite = 			true;			// tracking omniture
	   
		//version 
		this.version =				2.3;			// modificar version al crear un nuevo metodo
		this.setVersion(this.version, 'PrivaliaCountryBase');
	},
	
    /**
     * Extraer el valor de un precio eliminando la moneda
     * (metodo personalizado en mex y br)
     */
    extractValue: function(value){
		s_cleanValue = value.substring(0,4); //es e it
		return s_cleanValue;
    },

    /**
     * Devuelve si esta activado el co-registro con groupalia
     */
    getCoRegister: function () {
    	return this.b_co_register;
    },
    
    /**
     * Obtener el dominio excluyendo subdominio. Dato util para analytics, por ejemplo
     * ejemplo de retorno: "privalia.loc", "privalia.com", "privalia-test.com"
     */
    getDomain: function () {
    	if(this.s_domain == '') {
    		var i_max = 	0;
    		var v_tmp = 	[];
    		
    		v_tmp = document.domain.split(".");
    		
    		var i_max = v_tmp.length;
    		if(i_max >= 2) {
    			this.s_domain = v_tmp[i_max - 2] + "." + v_tmp[i_max - 1];
    		}
    	}
    	return this.s_domain;
	},
	
    /**
     * Devuelve el key del Google Analytics
     */
    getKeyAnalytics: function () {
    	var s_domain = this.getDomain();

    	// TODO: Hacer esto mas limpio
    	if( s_domain.indexOf(".dev") >= 0 || s_domain.indexOf(".loc") >= 0 || s_domain.indexOf("privalia-test") >= 0 ) {
    		this.s_keyAnalytics = "1";
    	}
    	
    	return this.s_keyAnalytics;
    },
    /**
     * Devuelve el key del Google Website Optimizer
     */
    getKeyGWO: function () {
    	var s_domain = this.getDomain();
    	// TODO: Hacer esto mas limpio
    	if( s_domain.indexOf(".dev") >= 0 || s_domain.indexOf(".loc") >= 0 || s_domain.indexOf("privalia-test") >= 0 ) {
    		this.s_keyGWO = "1";
    	}
    	
    	return this.s_keyGWO;
    },
    /**
     * Devuelve la ISO del pais
     */
    getIso: function () {
    	return this.iso;
    },

    /**
     * Check para habilitar/deshabilitar operadores logisiticos ademas del de por defecto
     */
    getLogisticCarrier: function(){
    	return this.b_logistic_carrier;
    },

    /**
     *
     * Devuelve si esta activado el servicio de compra en un click
     */
    getOneClickPayment: function () {
    	return this.b_oneclick_payment;
    },
    /**
     * Check Selling Service esta activo para este pais
     */
    getService: function () {
    	return this.service;
    },

    /**
     * Check Size Filtering esta activo para este pais
     */
    getSizeFiltering: function () {
    	return this.sizeFilter;
    },

    /**
     * Check Social Buttons activos para este pais
     */
    getSocial: function () {
    	return this.bSocial;
    },
    /**
	 * Devuelve un valor booleano que indica si el tracking esta habilitado
	 */
    getTracking: function () {
    	return this.b_trackSite;
    },

    /**
     * esta habilitado el proceso de reabrir pedido
     */
    reopenOrderEnabled: function () {
    	return this.b_reopenOrder;
    },
    
    /**
     * Groupalia: Check Offers esta activo para este pais
     */
    getOffersGroupalia: function () {
    	return this.b_offers_groupalia;
    },

    /**
     * Funcion que comprueba si el parametro es un numero entero sin signo.
     * @params integer i_number: Número a comprobar.
     * @returns boolean. True si es un numero entero sin signo o false en caso contrario.
     */
    _isUnsignedInteger: function (i_yourNumber)
    {
        var s_template = /^\d+$/; //Formato de numero entero sin signo
        return s_template.test(i_yourNumber);
    }
});VERSION_PrivaliaDarkGuardian=2.1;var PrivaliaDarkGuardian=Class.create({initialize:function(){this.b_autoCountProcess=true;this.b_devel=false;this.b_error=false;this.b_loaded=false;this.b_showImage=true;this.b_timeout=true;this.i_debug=1;this.i_loading=0;this.i_processes=0;this.i_segTimeErrors=8;this.i_subtotal=0;this.i_total=0;this.idBar='dg-barProgress';this.intvl_fxBar=null;this.intvl_timeout=null;this.o_processes=$H();this.s_chat='DG: ';this.v_errorMsg=[];this.version=VERSION_PrivaliaDarkGuardian;},init:function(){if(this.i_debug>0){console.log(this.s_chat+' debug mode: '+this.i_debug);}
this._createBar();this.setProcess('DOM');this._start();this._startFx();},getFullyLoaded:function(){return this.b_loaded;},getLoaded:function(s_idProcess){var i_loaded=-1;if(s_idProcess!=''){i_loaded=this.o_processes.get(s_idProcess);}
return i_loaded;},log:function(s_msg,s_path){this.b_error=true;if(arguments.length>1){this._log('error',s_msg,s_path);}
else{this._log('error',s_msg);}PRV.Tracker.registerEvent('ErrorJS',{errorName:s_path||s_msg});
if(this.b_devel&&this.b_showImage){this.showTheFury();}},progress:function(i_percent,s_id){var i_loaded,i_newtotal;i_loaded=this._controlProcess(i_percent,s_id);if(i_loaded>=0){i_newtotal=i_loaded+i_percent;this.o_processes.set(s_id,i_newtotal);this._updateTotal(i_newtotal);if(this.i_debug>=2){console.log(this.s_chat+s_id+': '+i_newtotal+' (+'+i_percent+')');}}},setDevel:function(b){this.b_devel=b;if(this.b_devel){$(this.idBar).setStyle({height:'20px'});}},setNumberProcesses:function(i_num){if(!isNaN(i_num)){this.b_autoCountProcess=false;this.i_processes=i_num;}},setProcess:function(s_id){if(s_id!=''){if(Object.isUndefined(this.o_processes.get(s_id))){this.o_processes.set(s_id,0);if(this.b_autoCountProcess){this.i_processes++;}
if(this.i_debug>0){console.log(this.s_chat+'Vigilando nuevo proceso '+s_id);}}
else if(this.i_debug>0){console.log(this.s_chat+'El proceso '+s_id+' ya se definio antes');}}},setProgress:function(i_percentTotal,s_id){var i_newTotal=0;var i_loaded=this._controlProcess(i_percentTotal,s_id);if(i_loaded>=0){i_newTotal=i_percentTotal-this.o_processes.get(s_id);this.o_processes.set(s_id,i_percentTotal);this._updateTotal(i_newTotal);if(this.i_debug>=2){console.log(this.s_chat+'['+s_id+']: '+i_percentTotal+' (+'+i_newTotal+')');}}},showTheFury:function(){var idImg='dg-image';var e_barProgress=new Element('img',{src:'/front/get/img/darkguardian.jpg',id:idImg,style:'display:none',title:'He detectado errores en tu desarrollo! Mira la console del firebug',alt:'Dark Guardian'});$('page').insert({top:e_barProgress})
$(idImg).observe('click',function(){$(idImg).fade();});$('dg-image').show();},warning:function(s_msg,s_path){if(arguments.length>1){this._log('warning',s_msg,s_path);}
else{this._log('warning',s_msg);}},_controlProcess:function(i_percent,s_id){var i_loaded=-1;if(s_id!=''&&i_percent>0){i_loaded=this.o_processes.get(s_id);if(Object.isUndefined(i_loaded)){i_loaded=-1;}}
return i_loaded;},_createBar:function(){var idBar=this.idBar;var e_barProgress=new Element('div',{id:idBar});$('page').insert({top:e_barProgress})
$(this.idBar).observe('mouseover',function(){$(idBar).morph({height:'1px'})
$(idBar).stopObserving('mouseover');});},_finish:function(){this.b_loaded=true;if(!this.b_devel){$(this.idBar).fade();}
if(this.b_error){this._sendErrors();}
if(this.b_timeout){window.clearTimeout(this.intvl_timeout);}},_fxBar:function(){if(this.i_loading<this.i_total){this.i_loading++;$(this.idBar).setStyle({width:this.i_loading+'%'});}
else if(this.b_loaded){clearInterval(this.fx_interval);}},_log:function(s_type,s_err,s_path){s_type=s_type.toUpperCase();if(arguments.length==3){s_msg=this.s_chat+s_type+' <'+s_path+'> '+s_err;}
else{s_msg=this.s_chat+s_type+' en '+s_err;}
if(this.b_devel){if(window.console&&window.console.firebug){switch(s_type){case'ERROR':console.error(s_msg);break;case'WARNING':console.warn(s_msg);break;default:console.log(s_msg);break;}}
else{switch(s_type){case'ERROR':alert(s_msg);break;}}}
else{switch(s_type){case'ERROR':this.v_errorMsg.push(s_msg);break;}}},_sendErrors:function(){this.v_errorMsg.each(function(msg){})},_start:function(){var i_seconds=this.i_segTimeErrors;if(this.b_timeout&&i_seconds>0){this.intvl_timeout=window.setTimeout((function(){this.warning("FALLO en la carga de la pagina","Timeout "+i_seconds+"s");if(this.b_error){if(this.b_error){this._sendErrors();}}}).bind(this),i_seconds*1000);}},_startFx:function(){this.intvl_fxBar=setInterval(this._fxBar.bind(this),1);},_updateTotal:function(i_newtotal){if(i_newtotal!=0&&this.i_total<100){this.i_subtotal+=i_newtotal;var i_total=this.i_subtotal/this.i_processes;if(i_total>this.i_total){if(i_total>=100){i_total=100;this._finish();}
this.i_total=i_total;if(this.i_debug>=2){console.log(this.s_chat+': CARGANDO '+i_total+'%');}}}}});var DGuardian=new PrivaliaDarkGuardian();/**
 *  privalia.groupalia.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 90-privalia.base.js
 * @revision: 	1.0
 */ 

/**
 * PrivaliaJsonGroupalia - Common
 * =========================================
 * @modified: 	Cristina	(16-02-11)
 */
var PrivaliaJsonGroupalia = Class.create(PrivaliaBase, {
    initialize: function($super){
        $super();
        this.s_city =				"";	// ciudad que estamos volcando
        this.i_offersRead =			0;	// num de ofertas leidas o volcadas
        this.i_totalOffersCity = 	2;   //total de ofertas por ciudad
        
      //version 
	   	this.version =				1.1;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaJsonGroupalia');
    },
   
    /**
     * Construye la pagina con los datos pasados por json previamente
     */
    buildPage: function(generate){
        switch (generate) {
	        case 'offers':
	        	if (Country.getOffersGroupalia()){
	        		if ($("rssGroupalia") != null) {
	        		if($("rssGroupalia").hasClassName('hide')) {
	        			$("rssGroupalia").removeClassName('hide');
						}
					}
	        		
		        	this.generateHtml({
						pushData: this.pushOffers
					});
		        	Cufon.replace('.cufonTitleGP');
	        	}
		        break;
	        default:
	        	this.generateHtml();
        }
    },
    
    /**
	 * Segun la posicion de la oferta pone una clase u otra, es decir un color u otro
	 */
	getClassBkg: function (offersNumber) {
    	var res = '';
    	if(offersNumber % 2 === 0) {
    		res = 'gplBox';
    	}
    	else {
    		res = 'gplBox2';
    	}
		return res;
	},
	setTotalOffersGroupalia: function (i_offers) {
		this.i_totalOffersCity = i_offers;
	},
	
	/**
	 * Antes de volcar los datos al HTML, trato los datos
	 * En el caso basico no se tratan los datos, por tanto directamente se vuelca
	 */
    pushOffers: function (dataJson, index) {
		var city = this.getTarget();
		// inicializar cuando cambiemos de ciudad
		if(this.s_city !== city) {
			this.s_city = city;
			this.i_offersRead = 0;
		}
		if(this.i_offersRead < this.i_totalOffersCity) {
			dataJson.colourbkg = this.getClassBkg(this.i_offersRead);
			this.addBuilt(dataJson);
			this.i_offersRead++;			
		}
	}
});

/**
 * PrivaliaGroupalia - Common
 * =========================================
 * @revision: 	1.0
 * @modified: 	Cristina	(17-12-10)
 */
var PrivaliaGroupalia = new Class.create(PrivaliaJsonGroupalia, {
	initialize: function($super){
        $super();
        
      //version 
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaGroupalia');
	}
});
/**
 *  privalia.help.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 92-privalia.trackingstatus.js
 * @revision: 	1.0
 */  

/**
 * PrivaliaJsonHelp - Common
 * =========================================
 * @modified: 	Cristina	(31-01-11)
 */
var PrivaliaJsonHelp = Class.create(PrivaliaTrackingStatus, {
    initialize: function($super){
        $super();

		this.idReply = 			'';						//Respuesta por defecto
		this.idYesReply = 		'yesno-answer-yes';		//Mensaje cuando la respuesta es del tipo si/no y es si
		this.idNoReply = 		'yesno-answer-no';		//Mensaje cuando la respuesta es del tipo si/no y es no
		this.id02Reply = 		'numeric-answer-02';	//Mensaje cuando la respuesta es del tipo 0 a 5 y es de 0 a 2
		this.id34Reply = 		'numeric-answer-34';	//Mensaje cuando la respuesta es del tipo 0 a 5 y es de 3 a 4
		this.id5Reply = 		'numeric-answer-5';		//Mensaje cuando la respuesta es del tipo 0 a 5 y es de 5
		
		this.idOtherCampaignWrapper = 	'notinaccount_other_wrap';
		this.idOtherCampaignSelect = 	'notinaccount_campaign';
		this.s_otherCopy = '';
		
		this.idIssueRequest = 	'issue';
		
		  //version 
	   	this.version =				2.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaJsonHelp');
    },

    /**
     * Construye la pagina con los datos pasados por json previamente
     */
    buildPage: function(generate){
        switch (generate) {

	        case 'incomplete-order':
	        	this.generateHtml({
	        		pushData: this.pushIncompleteOrder
	        	});
	        	break;

	        case 'select-campaigns':
	        	this.generateHtml();
	        	this.feedSelectCampaign(this.getResData().campaigns, 'campaign');
	        	this.feedSelectCampaignOther(this.getResData().campaigns, 'campaign');
	        	break;

			case 'poll-reply':
	        	this.generateHtml({
	        		pushData: this.pushPollReply
	        	});

				$(this.idReply).show();
				Cufon.replace('h1');
	        	break;
	    
            default:
                this.generateHtml();
        }
    },
	
	/**
	 * Anyade la opcion de otra al select de campanyas del pedido fantasma
	 * @param {Object} idCombo
	 */
	addOtherOption: function(idCombo){
		var s_newOption = "<option value=\"1\">" + this.s_otherCopy + "</option>";
		$(idCombo).insert({
			bottom: s_newOption
		});
	},
	
	/**
	 * Alimentar el select de campanyas activas dando los valores en un array de json
	 */
	feedSelectCampaign: function (vCampaigns, target) {
		var built = '<option value="">---</option>';
		var tpl = 	new Template(TPL_SELECT);
		// Le pasamos en nombre de la campanya y el PK para el value
		vCampaigns.each(function(opt) {
			var css = "";
			var label = opt.campaign_name;
			var value = opt.campaign_PK;
			selected = "";
			option = {
				label: 		label,
				value: 		value,
				selected: selected,
				css: 		css
			};

			built += tpl.evaluate(option);

		}, this);
		
		//TODO: se puede unificar en un metodo pasando la clase css como parametro
		if(built != '' && target != undefined) {
			$(target).update('');
			$(target).insert({bottom:built});
			// Una vez creado el select replicamos su contenido a los selects con la clase css indicada
			var selectsCampaign = $$('.selectCampaign');
			selectsCampaign.each(function(sel) {
				sel.update($(target).innerHTML);
			});
		}

		return built;
	},
	
	/**
	 * Alimentar el select de campanyas activas con la adicion de la opcion "otra"
	 */
	feedSelectCampaignOther: function (vCampaigns, target) {
		var built = '<option value="">---</option>';
		var tpl = 	new Template(TPL_SELECT);
		// Le pasamos en nombre de la campanya y el PK para el value
		vCampaigns.each(function(opt) {
			var css = "";
			var label = opt.campaign_name;
			var value = opt.campaign_PK;
			selected = "";
			option = {
				label: 		label,
				value: 		value,
				selected: selected,
				css: 		css
			};

			built += tpl.evaluate(option);

		}, this);
		
		var s_newOption = "<option value=\"1\">" + this.s_otherCopy + "</option>";
		built += s_newOption;
		
		//TODO: se puede unificar en un metodo pasando la clase css como parametro
		if(built != '' && target != undefined) {
			$(target).update('');
			$(target).insert({bottom:built});
			// Una vez creado el select replicamos su contenido a los selects con la clase css indicada
			var selectsCampaignOther = $$('.selectCampaignOther');
			selectsCampaignOther.each(function(sel) {
				sel.update($(target).innerHTML);
			});
		}

		return built;
	},

	/**
	 * Alimentar el select de listado de pedidos dando los valores en un array de json
	 */
	feedSelectOrders: function (vOrders, target) {
		var built = '<option value="">---</option>';
		var tpl = 	new Template(TPL_SELECT);
		// Le pasamos en nombre de la campanya y el PK para el value
		vOrders.each(function(opt) {
			var css = "";
			var label = 'PE' + opt.order_PK + ' - ' + opt.campaign_name;
			var value = opt.order_PK;
			selected = "";
			option = {
					label: 		label,
					value: 		value,
					selected: selected,
					css: 		css
			};
			built += tpl.evaluate(option);

		}, this);
		//TODO: se puede unificar en un metodo pasando la clase css como parametro
		if(built != '' && target != undefined) {
			$(target).update('');
			$(target).insert({bottom:built});
			// Una vez creado el select replicamos su contenido a los selects con la clase css indicada
			var selectsOrders = $$('.selectOrders');
			selectsOrders.each(function(sel) {
				sel.update($(target).innerHTML);
			});
		}

		return built;
	},
	
	/**
	 Cuando se envia la comunicación DATA_BANK_REQUEST 
	 a los socios se solicita que se introduzca la información a través del un link
	 donde se proporciona la issue.
	 Este metodo me devuelve la issue
	 * */
	getIssueUrl: function (dataJson) {
		
		var url = this.getUrl();	
		var s_issue = this.getUrlParamValue('issue',url);
		
		//llamada json a partir del parametro issue de la url
		this.getData("/help/getBankRefundData/issue/" + s_issue);
		
		//asigna el issue al value hidden
		if (this.idIssueRequest){			
	    	$(this.idIssueRequest).value = s_issue;
		}
	},
	
	
	/**
	 * Antes de volcar los datos al HTML, trato los datos
	 * En el caso basico no se tratan los datos, por tanto directamente se vuelca
	 */
	pushIncompleteOrder: function (dataJson) {
		target = this.getTarget();

		if(target == "order_products") {
			id = "order_products_missed[" +  dataJson.ordline_FK_stockp_PK + "]['quantity']";
			options = this.feedSelectQuantity(dataJson.ordline_quantityWaybilled);
			
			// TODO: temporal
			dataJson.selectQuantity = '<select id="'+ id + '" name="'+ id + '">' + options + '</select>';

			/**
			 * TODO: forma correcta de crear un elemento select
			dataJson.selectQuantity = $(new Element('select', {
				id: id,
				name: id
			}).update(options));*/
		}

		this.addBuilt(dataJson);
	},

	/**
	 * Get data personalizado para la respuesta a la valoracion de servicio de SAS
	 */
	pushPollReply: function (dataJson) {
		target = this.getTarget();

		if(target == "polldata") {
			if(dataJson.polltype == "SAS_POLL_1"){
				switch (dataJson.pollvote) {
	                case '0':
						this.idReply = this.idNoReply;
	                    break;
	                case '1':
						this.idReply = this.idYesReply;
	                    break;
	                default:
	                    break;
				}
            }else if (dataJson.polltype == "SAS_POLL_2"){
				switch (dataJson.pollvote) {
					case '0':
					case '1':
					case '2':
						this.idReply = this.id02Reply;
						break;
					case '3':
					case '4':
						this.idReply = this.id34Reply;
						break;
					case '5':
						this.idReply = this.id5Reply;
						break;
					default:
						break;
				}
			}
		}

		this.addBuilt(dataJson);
	},
	
	/**
	 * Anyade un copy 
	 * @param {Object} s_copy - string con el contenido
	 */
	setOptionCopy: function(s_copy){
		this.s_otherCopy = s_copy;
	}
});

/**
 * PrivaliaHelp - Common
 * =========================================
 * @modified: 	Cristina	(14-06-11)
 */
var PrivaliaHelp = new Class.create(PrivaliaJsonHelp, {
	initialize: function($super) {
		$super();

		this.idDefaultAccordion = "accordion-c1";
		this.idDefaultAccordionTitle = "title-bar-c1";

		this.orderProductsLoaded = 			false;
		
		 //version 
	   	this.version =				1.4;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaHelp');
	},

	/**
	 * Genera tabla del estado del pedido seleccionado en el combo
	 */
	callOrderDetails: function (idpk)	{
		if (idpk == '') {
			$('status_orders_data').style.display='none';
		}
		else {
			// Guarda en sesion el orderPK (id del pedido)
			this.callSetOrder(idpk, this._responseOrderDetails.bind(this));
		}
	},

	/**
	 * Genera la lista de productos para el formulario de pedidos incompletos
	 */
	callOrderProducts: function (idpk)	{
		if (idpk != '') {
			// Guarda en sesion el orderPK (id del pedido)
			this.callSetOrder(idpk, this._responseOrderProducts.bind(this));
		}
	},

	callSetOrder: function(idpk, onComplete) {
		var url = '/myaccount/setorder/order/' + idpk;
		new Ajax.Request(url,{
			onComplete : onComplete
		});
	},
	
	/**
	 * Comprueba que la campanya seleccionada sea o no otra, para mostrar el input
	 * @param {Object} combo
	 */
	checkOtherCampaign: function(combo){
		if (combo.value == 1){
			$(this.idOtherCampaignWrapper).removeClassName("hidden");
		}else if( $(this.idOtherCampaignWrapper).hasClassName("hidden")== false ){
			$(this.idOtherCampaignWrapper).addClassName("hidden");
		}
	},

	/**
	 * Cambia los pedidos de un select de pedidos por todos los
	 * pedidos del socio.
	 * @param {Object} idSelect ID del select a llenar (o el HTMLElement)
	 * @param {string} sUrl llamada ajax pedidos activos
	 * @param {bool} bChecked Si este parámetro es true se deshace el cambio	 
	 */
	checkAllOrders: function(idSelect, sUrl, bChecked){
		var oFirstOption = {},
		sTextFirstOption = "";
		if ( (idSelect != "") && ($(idSelect) != null) &&  (sUrl != "") ) {
			//Extraer el primer elemento del select			
			oFirstOption = $(idSelect).firstDescendant();
			if (oFirstOption !== null) {
				sTextFirstOption = $(idSelect).firstDescendant().text;				
				if (sTextFirstOption !== '') {
					$(idSelect).update('<option value="0">' + sTextFirstOption + '</option>');
				}
			}
			if (bChecked == true) {
				this.getDataSelect(idSelect,'/myaccount/getAllOrders');				
			} else {
				this.getDataSelect(idSelect,sUrl);
			}
		}
	},
	/**
	 * closeForm personalizado para la seccion de ayuda. Tanto si tiene el flag closeAfterSubmit puesto a true como si no cerramos el form.
	 */
	closeForm: function() {
		// cerramos el form
		this.hideItem(this.getFormActual());
	},

	/**
	 * Muestra los inputs correspondientes a la forma de pago escogida pasandole la id a mostrar y la clase css de los elementos a ocultar
	 */
	displayPaymentMethod: function(id,css) {
		//Inicialmente ocultamos todos los metodos de pago
		var method = $$('.'+css);
		method.each(function(item) {
			if($(item).getStyle('display') != 'none') {
				$(item).setStyle({'display': 'none'});
			}
		});
		//Comprobamos si ha seleccionado algun metodo y lo mostramos. Si ha seleccionado la primera opcion (vacia) no mostramos nada
		if (id != '') {
			$(id+'-payment').appear({duration:1});
		}

	},
	
	/**
	 * Metodo que obtiene la url. Posteriormente hace un split de la url cada vez que encuentra /
	 * y obtiene el elemento id del mensaje
	 * Asigna el value al input requerido
	 */
	setReplyId: function () {
		url = this.getUrl();
		v_urlReply = url.split("/");
		// Comprobamos si existe el campo godfather y si existe asignamos los values a cada campo
		if(v_urlReply.indexOf("issue") > -1) {
			var i_idReply=(v_urlReply[6]);
			$('issuereply_babel_issue_id').value = i_idReply;
		}
	},

	/**
	 * Muestra la seccion correspondiente de la ayuda en funcion de la url
	 * @param {Object} url - url al cargar la pagina de ayuda
	 * @param {Object} section - seccion de la ayuda
	 */
	showSection: function ( section ){
		var url = this.getUrl();
		var s_sectionId;
		var idDesiredAccordion;
		var idAccTitleBar;

		if (section == "index"){
			if (url.split("#accordion")[1]){
				s_sectionId = url.split("#accordion")[1];

				idDesiredAccordion = "accordion" + s_sectionId;
				idAccTitleBar = "title-bar" + s_sectionId;
			}else{
				idDesiredAccordion = this.idDefaultAccordion;
				idAccTitleBar = this.idDefaultAccordionTitle;
			}
		}else{
			if (url.split("#accordion")[1]){
				s_sectionId = url.split("#accordion")[1];

				idDesiredAccordion = "accordion" + s_sectionId;
				idAccTitleBar = "title-bar" + s_sectionId;
			}else{
				idDesiredAccordion = this.idDefaultAccordion;
				idAccTitleBar = this.idDefaultAccordionTitle;
			}
		}
		// Cambiamos el estado del elemento correspondiente
		this.toggleData(idDesiredAccordion,$(idAccTitleBar));
	},

	/**
	 * Personalizacion para resetar formularios en la seccion help
	 * Se esta utilizando en la tpl, replyissue.body.tpl en BR
	 * @param {Object} response
	 */
	submitAndReset: function(idForm) {
		this.submit(idForm, this._submitAndReset.bind(this));
	},

	_submitAndReset: function (response) {
		this.parseResponse(response);
		if(this.statusOK()) {

			// reseteamos el formulario pasandole como parametro el formulario que estamos tratando
			Form.reset(this.getFormActual());

			// mostrar mensaje de notificacion
			this.notify(this.getResTextcodes());

			
		}
		else {
			this.endSubmitError();
		}
		this.stopLoad();
		this.formActual = '';
	},

	_responseOrderDetails: function ()	{
		// Obtiene los datos del pedido seleccionado para volcarlos posteriormente en la tabla
		var urldetail = '/myaccount/getOrderDetailData';
		new Ajax.Request(urldetail,{
			onComplete : (function(response) {
				this.parseResponse(response);
				// Guardamos los datos json que necesitamos
				var idCampaignName = this.getResData().order_data.campaign_name;
				var idOrderPK = this.getResData().order_data.order_PK;
				var idOrderCreated = this.getResData().order_data.order_created;
				var idOrdstatusPK = this.getResData().order_data.ordstatus_PK;
				var idOrdstatus = this.getResData().order_status.ordstatus_tracking;

				// En funcion del order_status_tracking del pedido, mostramos una descripcion de estado homogeneo
				var idOrdstatusDescription = this.setOrderStatusList(idOrdstatus);

				//Remplazamos los datos
				$('status_campaign_name').update(idCampaignName);
				$('status_order_PK').update(idOrderPK);
				$('status_order_created').update(idOrderCreated);
				$('status_ordstatus_description').update(idOrdstatusDescription);
				$('status_ordstatus_description').writeAttribute('class', '');
				$('status_ordstatus_description').addClassName('order-status_'+idOrdstatusPK);
				// Pone el link a la pagina de detalle de pedido
				$('view_order_link').observe('click', (function() {
					// ir al detalle de pedido
					this.goToOrder(idOrderPK);
				}).bind(this));
				//Muestra la tabla con los datos y el link al detalle
				$('status_orders_data').show();
			}).bind(this)
		});
	},

	/**
	 * respuesta del callOrderProducts(), tras guardar el orderpk en sesion, pedimos los datos de ese pedido
	 * para montar la lista de productos para el formulario de pedidos incompletos
	 */
	_responseOrderProducts: function ()	{
		if(this.orderProductsLoaded) {
			this.reload();
		}
		else {
			this.orderProductsLoaded = true;
			// Obtiene los datos del pedido seleccionado
			this.getData('/myaccount/getOrderDetailData','incomplete-order');
			$('order_products').appear({duration:1});
		}

	}
});/**
 *  privalia.landing.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 90-privalia.base.js
 * @revision: 	1.1
 */ 

/**
 * PrivaliaJsonLanding - Common
 * =========================================
 * @modified:     Naiara	(22-06-11)
 */
var PrivaliaJsonLanding = Class.create(PrivaliaBase, {

	initialize: function($super) {
		$super();
		
		this.code_provider = '';
		this.formType = '';
		this.code_id = 0;
		
		//version 
	   	this.version =				1.1;		//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaJsonLanding');
	},
	
	 /**
     * Construye la pagina con los datos pasados por json previamente
     */
    buildPage: function(generate){
        switch (generate) {
            case 'landing_page':
                this.generateHtml();
				this.setUpDynamicVariables();
                break;
            default:
                this.generateHtml();
        }
    },
	
	/**
	 * Devuelve el codigo a mandar como parametro a Google Analytics
	 * Incluyendo el tipo de formulario
	 */
	getAnalyticsUrl: function(){
		if (this.formType == ''){
			this.formType = this.getResData().landing_data.form_type;	
		} 
		return window.location.pathname + "#form=" + this.formType;
	},
	
	/**
	 * Detalle de Producto - Constructor de URLs
	 * para getDatas a partir de la URL del navegador
	 */
	getUrlGetData: function (page) {
		var url = this.getUrl().toLowerCase(),
		urlGetData = '';

		switch(page) {
			// Landing Page
			case 'landing': default:
				var code_id = this.getUrlGetParameters('id', url),
				code_promo = this.getUrlGetParameters('promo', url),
				code_provider = this.getUrlGetParameters('provider', url),
				code_ql = this.getUrlGetParameters('ql', url);
				
				if (code_ql !== ''){
					urlGetData = "/landing/landingsData/id/" + code_id + "/promo/" + code_promo + "/provider/" + code_provider + "/ql/" + code_ql;
				}else{
					urlGetData = "/landing/landingsData/id/" + code_id + "/promo/" + code_promo + "/provider/" + code_provider;
				}
				
				//Nos guardamos el provider para utilizarlo mas tarde
				this.code_provider = code_provider;
				this.code_id = code_id;
			break;
		}
		return urlGetData;
	},
	
	/**
	 * Sobreescribimos el notify para redireccionar en caso de error por url incompleta
	 * @param {Object} textcode
	 * @param {Object} description
	 */	
	notify: function($super, textcode, description){
		
		switch (textcode){
			case 'msg0170001':
				document.location = URL_DOMAIN + '/public/register';
			break;
			default:
				$super(textcode, description);
			break;
		}
	},
	
	/**
	 * Gestionamos las variables dependientes, obteniendo los dastos desde el Json
	 */
	setUpDynamicVariables: function(){
		var data = this.getResData();
		
		/*this.setUpType();*/
		this.setUpBackground();
		this.setUpForm(data, this.code_provider, this.code_id);
		this.setUpTracking();
	}

});

/**
 * PrivaliaLanding - Common
 * =========================================
 * @modified:     Marcos	(17-5-11)
 */
var PrivaliaLanding = new Class.create(PrivaliaJsonLanding, {

	initialize: function($super) {
		$super();
		
		this.idValidRegister = 'valid-register';

		//version 
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaLanding');
	},
	
	/**
	 * Ocultamos los campos para mostrar el formulario 1
	 */
	form1SetUp: function(){
		if($('field-member_zipcode') !== null && $('field-member_sex') !== null){
			$('field-member_zipcode').addClassName('hidden');
			$('field-member_sex').addClassName('hidden');
		}
	},
	
	/**
	 * Ocultamos los campos para mostrar el formulario 2
	 */
	form2SetUp: function(){
		if($('field-member_lastname_1') !== null && $('field-member_sex') !== null && $('field-member_zipcode') !== null){
			$('field-member_zipcode').addClassName('hidden');
			$('field-member_sex').addClassName('hidden');
			$('field-member_lastname_1').addClassName('hidden');
			if($('field-member_lastname_2') !== null){
				$('field-member_lastname_2').addClassName('hidden');
			}
		}
	},

	/**
	 * Ocultamos los campos para mostrar el formulario 3
	 */
	form3SetUp: function(){
		if($('field-member_zipcode') !== null){
			$('field-member_zipcode').addClassName('hidden');
		}
	},
	
	/**
	 * Ocultamos los campos para mostrar el formulario 4
	 */
	form4SetUp: function(){
		//Nothing to do
	},
	
	/**
	 * Ocultamos los campos para mostrar el formulario 5
	 */
	form5SetUp: function(){
		if($('field-member_email_confirm')!== null && $('field-member_name') !== null && $('field-member_lastname_1') !== null && $('field-member_sex') !== null && $('field-member_zipcode') !== null){
			$('field-member_zipcode').addClassName('hidden');
			$('field-member_sex').addClassName('hidden');
			$('field-member_name').addClassName('hidden');
			$('field-member_email_confirm').addClassName('hidden');
			$('field-member_lastname_1').addClassName('hidden');
			if($('field-member_lastname_2') !== null){
				$('field-member_lastname_2').addClassName('hidden');
			}
		}
	},

	/**
	 * Metodo que extrae los parametros de la url codificada
	 * @param {Object} name
	 */
	getUrlGetParameters: function(name, url){
		name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
		var regexS = "[\\?&]" + name + "=([^&#]*)",
		regex = new RegExp( regexS ),
		results = regex.exec( url );
		
		if( results == null ){
			return "";
		}else{
			return results[1];
		}
	},	
	
	/**
	 * Muestra la confirmacion del registro en Privalia
	 * TODO: Extraer esto hacia privalia.webservice.js
	 */
	landingRegisterSuccess: function (){
		if($('register-form') !== null){
			$('register-form').addClassName('hidden');			
		}
		if ($(this.idValidRegister) !== null) {
			$(this.idValidRegister).removeClassName('hidden');			
		}
		//Tracking
		_gaq.push(['_trackPageview', this.getAnalyticsUrl() + '/ok']);
		PRV.Tracker.registerView('');
	},
	
	/**
	 * Muestra el fondo de la landing
	 */
	setUpBackground: function(data){
		if ($('bkg-img') !== null && $('url-container') !== null ){
			var url_image = $('url-container').innerHTML;
			if (url_image !== ''){
				$('bkg-img').setAttribute('src', url_image);
			}else{
				$('bkg-img').setAttribute('src', '/front/get/img/bkg-landing.jpg');
			}
		}
	},
	
	/**
	 * Muestra el tipo de formulario requerido por el Json
	 */
	setUpForm: function(data, provider, id){
		switch (data.landing_data.form_type){
			case 1:
				$('member_provider_code').value = provider;
				$('landing_PK').value = id;
				$('reg_form_PK').value = 1;
				this.form1SetUp();
				break;
			case 2:
				$('member_provider_code').value = provider;
				$('landing_PK').value = id;
				$('reg_form_PK').value = 2;
				this.form2SetUp();
				break;
			case 3:
				$('member_provider_code').value = provider;
				$('landing_PK').value = id;
				$('reg_form_PK').value = 3;
				this.form3SetUp();
				break;
			case 4:
				$('member_provider_code').value = provider;
				$('landing_PK').value = id;
				$('reg_form_PK').value = 4;
				this.form4SetUp();
				break;
			case 5: default:
				$('member_provider_code').value = provider;
				$('landing_PK').value = id;
				$('reg_form_PK').value = 5;
				this.form5SetUp();
				break;
		}
	},
	
	
	/**
	 * TODO: Marcos - A utilizar en el futuro
	 * Configuramos el layout y la imagen de fondo de la landing page
  	 * @param {Object} data
	 */
	setUpType: function(data){
		
	},
	
	/**
	 * Configuramos el tracking de la landing en funcion de la url
  	 * @param {Object} data
	 */
	setUpTracking: function(){
		 _gaq.push(['_trackPageview',this.getAnalyticsUrl()]);

	    (function() {
	      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	    })();
	},
	
	/**
	 * Submit personalizado para el envio de los formularios del landing
	 * @param {Object} idForm
	 */
	submitLandingRegister: function(idForm) {
		return this.submit(idForm, this._submitAndShowThanks.bind(this));
	},
	
	/**
	 * GEstiona la respuesta al envio del formulario
	 * @param {Object} response
	 */
	_submitAndShowThanks: function(response){
		this.parseResponse(response);
		if(this.statusOK()) {
			// Mostramos el agradecimiento
			this.landingRegisterSuccess();
		}else {
			this.endSubmitError();
		}
		this.stopLoad();
	}
});var PrivaliaMenuFlow=Class.create({initialize:function(){this.b_menuFlowEffect=true;this.cssSwitchMenuflow='switched';this.idMenu='menuFlow';this.idSwitchMenuflow='switchMenuflow';this.fx=null;this.i_fx_sec=0.6;this.i_menuHeight=0;this.i_scrollOffset=0;this.i_y=0;this.i_y0=0;this.i_yMax=0;this.s_fx_effect='static';this.cfg_cssAnimated={position:'relative',left:'auto',top:'auto',bottom:'auto'};this.cfg_cssFixed={position:'fixed',left:'auto',top:'10px',bottom:'auto'};this.cfg_cssNormal={position:'relative',left:'0px',top:'0px',bottom:'auto'};this.init();},flow:function(){if(this.s_fx_effect=='static'){if(this.i_scrollOffset>this.i_y0){if((this.i_scrollOffset+this.i_menuHeight)>this.i_yMax){var i_heightDivBody=$('divBody').getHeight();$(this.idMenu).setStyle({position:'relative',top:(i_heightDivBody-this.i_menuHeight)+'px'});}
else{$(this.idMenu).setStyle(this.cfg_cssFixed);}}
else{$(this.idMenu).setStyle(this.cfg_cssNormal);}}
else{if(this.i_scrollOffset>this.i_y0){if((this.i_scrollOffset+this.i_menuHeight)>this.i_yMax+40){this._startFx($('divBody').getHeight()-this.i_menuHeight);}
else{if(this.i_scrollOffset>this.i_y||this.i_scrollOffset<this.i_y){this._startFx();}}}
else{this._startFx(0);}}},getScrollTop:function(){return this.i_scrollOffset;},init:function(){this.i_y0=$(this.idMenu).cumulativeOffset().top;Event.observe(window,'scroll',this.onScroll.bind(this));},onScroll:function(event){if(this.b_menuFlowEffect){this.i_menuHeight=$(this.idMenu).getHeight();this.i_yMax=$('divFooter').cumulativeOffset().top;this.setScrollTop();if(this.fx!==null){this.fx.cancel();}
this.flow();}},setScrollTop:function(){this.i_scrollOffset=document.viewport.getScrollOffsets()[1];},switchTransition:function(){if(this.s_fx_effect=='static'){this.s_fx_effect='sinoidal';$(this.idMenu).setStyle(this.cfg_cssAnimated);this.flow();}
else{this.s_fx_effect='static';}
$(this.idSwitchMenuflow).toggleClassName(this.cssSwitchMenuflow);},_startFx:function(yTarget){if(Object.isUndefined(yTarget)){this.i_yTarget=this.i_scrollOffset-this.i_y0+10;}
else{this.i_yTarget=yTarget;}
this.fx=new Effect.Move(this.idMenu,{x:0,y:this.i_yTarget,mode:'absolute',duration:this.i_fx_sec,transition:Effect.Transitions.sinoidal,fps:100});}});/**
 *  privalia.menuheader.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js
 * @revision: 	1.0
 */

/**
 * PrivaliaJsonMenuheader - Common
 * =========================================
 * @modified: 	Ruben	(03-06-2011)
 */
var PrivaliaJsonMenuheader = Class.create(PrivaliaMyCart, {
  initialize: function($super) {
    $super();

    this.b_cartLoaded =		false;
    this.b_checkReopen =	false;
    this.b_AddToCart = 		false;
    this.cartEmptyHeight =	'120'; 				// px
    this.cartFullHeight =	'150'; 				// px
    this.cssJson =			'jsonMH';
    this.idCart =			'divCart';
    this.idCartData =		'cart-data';
    this.idCartBtn =		'cart_buttons';
    this.idMiniCart =		'mini-cart';
    this.idMiniCartFull =	'miniCartBody';
    this.idMiniCartEmpty =	'miniCartBodyEmpty';
	this.idPromoNext =		'promo-cart-2';
	this.idPromoToday =		'promo-cart-1';
    this.idSubtotal =		'mini-cart_subtotal-label';
    this.idVouchers =		'divVouchers';
    this.errId =			'26';
    this.modalReopen =		null;
    this.noVouchers =		false;
    this.numItems =			-1;
    this.reopenErrorText =	'';

    // temporizador
    this.timerDiv = 			'cart-time';		// Id del contenedor donde va el temporizador y los copys
    this.idCountdown = 			'countDown';		// Id del contenedor donde va a ir la cuenta atras
    this.idCountdownCart =		'countDownCart';		// Id del contenedor donde va la cuenta atras en la cesta
    this.cartInterval =			0;

    this.txt_novouchers =	'no vouchers';

     //version
		this.version =				3.0;  //modificar version al crear un nuevo metodo - P693
       this.setVersion(this.version, 'PrivaliaJsonMenuheader');
  },

  /**
   * Construye la pagina con los datos pasados por json previamente
   */
  buildPage: function(generate) {
    // en este punto ya ha cargado los datos de la cesta
    this.setCartLoaded(true);

    switch(generate) {
      default:
        this.generateHtml({
          pushData: this.pushCartBox
        });

        // Llamamos al temporizador
        if(this.getTimer() != false){
          // temporizador que sale en la tpl
          if($(this.idCountdown) !== null){
            this.countdown(this.getTimer(), this.idCountdown);
          }
          // temporizador que sale en la cesta
          if($(this.idCountdownCart) !== null){
            this.countdown(this.getTimer(), this.idCountdownCart);
          }
          // en el caso de que exista una cuenta atras se muestra el icono del reloj
          $$('.ico-countdown').each(function(item){
            $(item).removeClassName('hidden')
          });

        }
        else if (this.getTimer() == false){
          // en el caso de que el tiempo se haya agotado oculta el icono del reloj
          $$('.ico-countdown').each(function(item){
            $(item).addClassName('hidden')
          });
        }

        //Comprobamos que no se le ha asignado la clase hidden
        //TODO: Marcos - Averiguar por que se adjunta la clase hidden a header_order_products
        this._checkHiddenId();

        // si no tiene cheques regalo, hay que mostrar el texto de 'no tienes cheques'
        if(this.noVouchers && this.txt_novouchers != 'no vouchers') {
          $(this.idVouchers).hide();
          $('header_order_data').addClassName('padtop5');

        }
        this.setMemberMail();

        //Preparamos la cesta segun si hay o no productos asegurandonos que existe la cesta
        if($(this.idCart) != null){
        	this.checkCartStatus();
        }

        if(!this.reloading && Country.reopenOrderEnabled()) {
          // comprobar si se ha de comprobar el caso reabrir pedido
          var s_reopenCase = Reopen.checkReopenCase(); // el objeto Reopen se ha instanciado en inc.header_private.tpl
          if(s_reopenCase != '') {
            Reopen.init(s_reopenCase, this.getReopenedOrderPK(), this.getReopenedCampaignPK());
          }
        }


        //Si esta haciendo reloading significa que estamos anyadiendo un producto por lo que mostramos la cesta y seteamos a true
        if(this.reloading){
          // seteamos a true para controlar el comportamiento de la cesta cuando se esta anyadiendo un producto
          this.b_AddToCart = true;
          this.viewcart();
        }

        this.stopLoadText();
        break;
    }
  },
	/**
	 * Reseteamos el contador de la cesta
	 */  
	cartCounterReset: function (){
		clearInterval(this.cartInterval);
		$(this.idCountdownCart).update('');
  	},

  /**
   * Reiniciamos la cesta
   */
  clearMiniCart: function(){
    $(this.idMiniCart).startWaiting();
    $(this.idMiniCartEmpty).hide();
  },
  /**
   * Comprueba si tiene la cesta vacia o no, y configura el modo de visualizacion y la botonera
   */
  checkCartStatus: function () {
    // tiene productos en el carrito, mostramos botones y usamos icono correcto
    if(this.getNumItems() > 0) {
      $(this.idMiniCartEmpty).hide();
      $(this.idMiniCartFull).show();
      if($(this.idMiniCart).hasClassName('empty')){
    	  $(this.idMiniCart).removeClassName('empty');
      }
    }else{
		this.cartCounterReset();
      $(this.idMiniCart).addClassName('empty');
      $(this.idMiniCartFull).hide();
      $(this.idMiniCartEmpty).show();
		if($(this.idNotification) !== null) {
        	this.closeNotify();
        }
    }
    $(this.idMiniCart).stopWaiting();
  },

   /**
   * Countdown Timer, cuenta atras para vaciar la cesta de productos
   */
  countdown: function (remain, id, modal){
    if(id != '' && $(id) !== null){
      // pasamos la id en la que se mostrara el reloj
      var countdown = $(id),
      b_timer = true;

      if(countdown.innerHTML == ''){
        // configuramos el intervalo de la cuenta atras
        var timer = setInterval( (function () {
          // insertamos el reloj en el formato configurado
          countdown.innerHTML = Math.floor(remain/60) + ":" + (remain%60 < 10 ? "0": "") + remain %60;
          // si el tiempo restante es menor a 0 es que ha terminado
          if (remain-- <= 0 && b_timer == true ){
            // reset - detiene el contador a 00:00
            // TODO: Revisar esta funcion
            clearInterval(timer);
            // se vacia la cesta
            MH.submitEmptyCart('emptyCart');
            // abre la modal que comunica la caducidad de la cesta y hace un refresh de la pagina
            this.expiredCartModal();

            // Ocultar el div del temporizador
            if($(this.timerDiv) !== null){
            	$(this.timerDiv).addClassName("hidden");
            }
            // Para evitar llamadas a emptyCart y que solo la haga una vez
            b_timer = false;
          }
	  this.cartInterval = timer;
        // no cambiar, este integer es el intervalo normal de tiempo
        }).bind(this),1000);
      }
      }
  },

  /**
   * Abre el modal cuando el tiempo de la cesta a caducado
   */
  expiredCartModal: function(){
    // declaramos que modal se va a abrir
    var modal = new Control.Modal('modalExpiredCart', CFG_NO_AVOIDABLE_MODAL);
    // se abre la modal
    modal.open();
  },


  /**
   * Los datos de la cesta se han cargado
   */
  getCartLoaded: function() {
    return this.b_cartLoaded;
  },

  /**
   * Devuelve si se ha de checkear el caso de reabrir pedido
   */
  getCheckReopen: function () {
    return this.b_checkReopen;
  },

  /**
   * Devuelve el mail del socio
   */
  getMemberMail: function () {
    var res = '';
    if(!Object.isUndefined(this.getResData().header_page_data)) {
      res = this.getResData().header_page_data.member_email;
    }
    return res;
  },

  /**
   * Devuelve el numero de items que tiene la cesta
   */
  getNumItems: function () {
    if(!Object.isUndefined(this.getResData().header_order_data)) {
      this.numItems = this.getResData().header_order_data.order_num_items;
    }
    else {
      this.numItems = 0;
    }
    return this.numItems;
  },

  /**
   * Devuelve el nombre de la campaign_PK del pedido reabierto
   */
  getReopenedCampaignName: function () {
    var res = '';
    if(!Object.isUndefined(this.getResData().header_campaign_data)) {
      res = this.getResData().header_campaign_data.header_campaign_name;
    }
    return res;
  },

  /**
   * Devuelve campaign_PK del pedido reabierto
   */
  getReopenedCampaignPK: function () {
    var res = '';
    if(!Object.isUndefined(this.getResData().header_campaign_data)) {
      res = this.getResData().header_campaign_data.header_campaign_PK;
    }
    return res;
  },

  /**
   * Devuelve el order_PK del pedido reabierto
   * Si no esta reabriendo el pedido, el valor es 0
   */
  getReopenedOrderPK: function () {
    var res = '';
    if(!Object.isUndefined(this.getResData().header_order_data)) {
      res = this.getResData().header_order_data.header_reopened_order;
    }
    return res;
  },
  /**
   * Devuelve el subtotal de la cesta
   */
  getSubtotal: function () {
    var res = '';
    if(!Object.isUndefined(this.getResData().header_order_data)) {
      res = this.getResData().header_order_data.order_amount;
    }
    return res;
  },

  /**
   * Recoge el valor json correspondiente al temporizador de la cesta
   */
  getTimer: function(){
    if(!Object.isUndefined(MH.getResData().header_order_data.header_order_expires)){
      // recogemos el valor de la cuenta atras para el carrito
      var timerValue = MH.getResData().header_order_data.header_order_expires;
      if(timerValue != '0'){
        if($(this.timerDiv) !== null){
          //Mostramos el temporizador de la tpl
          $(this.timerDiv).removeClassName('hidden');
        }
        // devolvemos el valor en segundos
        return timerValue;
			}else{
        //devolvemos false para no inicializar el temporizador
        return false;
      }
    }
   },
	
	/**
	* Vuelca el Mini-carrito
	* @param {Object} dataJson
	* @param {Object} index
	*/ 
  pushCartBox: function(dataJson, index) {
		var noVouchers = false,
		promotions = 0,
		vouchers = 0,
		target = this.getTarget();

    // comprobar si tiene cheques regalo
    if(target == 'header_voucher_data') {
      vouchers = dataJson.total;
      // TODO: hay que comparar de otra forma ya que incluyen la moneda
      if(!vouchers) {
        dataJson.total = '';
        this.noVouchers = true;
      }
    }

	if(target == 'header_order_data') {
		if($(this.idSubtotal) !== null){
			var s_subTotal = this.getSubtotal();
			$(this.idSubtotal).update(s_subTotal);
		}
		// comprobar si tiene promociones
		promotions = dataJson.header_order_activates_promotion;
			if (promotions === 1 && ($(this.idPromoNext) != null)) {
			$(this.idPromoNext).removeClassName("hidden");
			} else if (promotions > 1 && ($(this.idPromoToday) != null)) {
			$(this.idPromoToday).removeClassName("hidden");
		}
	}
		// Si el campo del nombre viene vacio, no introducimos ningun espacio
		if(target == 'header_page_data') {
			if(dataJson.member_name !== ''){
				dataJson.member_name = ' ' + dataJson.member_name; 
			}
		}

    //sumo datos a volcar
    this.addBuilt(dataJson);
  },
  /**
   * Actualizar la cesta de compra
   */
  reload: function ($super) {
    if (!this.b_AddToCart){
      this.clearMiniCart();
    }
    // reload generico
    $super();
  },
  /**
   * Decir si la cesta se ha cargado o no
   */
  setCartLoaded: function(b_loaded) {
    this.b_cartLoaded = b_loaded;
  },

	/**
	 * 
	 * @param {Object} txt
	 */
  setTxtNoVouchers: function (txt) {
    this.txt_novouchers = txt;
  },

  /**
   * Recupera el mail del socio para volcarlo en los inputs de los forms
   */
  setMemberMail: function(){
    //Recuperamos el mail del socio desde la cabecera
    var memberMail = this.getMemberMail();
    //Asignamos el valor recuperado a todos los inputs marcados con la clase indicada
    var itemMemberMail = $$('.setMemberMail');
    itemMemberMail.each(function(item) {
      item.value = memberMail	;
    });
  },

	/**
	 * 
	 * @param {Object} $super
	 */
  setTooltips: function ($super) {
    $super();
    if($('link-why') != null){
      // temporizador
      Event.observe(window,'load', function() {
        new PrivaliaTooltip('link-why', 'cart-time-content', {
          type: 'html',
          target: 'b',
          tip: 'tr'
        });
      })
    }
  },
  /**
   * Comprobamos que el id header_order_products no esta oculto mientras haya algun producto en el carrito
   */
  _checkHiddenId: function(){
    var i_cartItems = this.getNumItems();
    if (i_cartItems > 0){
      $("header_order_products").removeClassName("hidden");
    }
  }
});


/**
 * PrivaliaMenuheader - Common
 * =========================================
 * @modified: 	Cristina	(13-05-11)
 */
var PrivaliaMenuheader = Class.create(PrivaliaJsonMenuheader, {
  initialize: function($super) {
    $super();

    this.b_topScroll =					true;					// cuando se muestra la cesta, ha de subir (scroll)
    this.b_open =						false;					// indica si la cesta esta abierta
    this.errId =						'04';
    this.max = 							0.7;
    this.target = 						'#divMenu #menu li';

    this.txt_hide =						'hide';
    this.txt_show =						'show';

    this.autoClose = 					null;					// guardamos el setTimeout del autocierre
    this.i_segAutoClose =				10;						// segundos hasta que la cesta se auto-cierra
    this.i_segCloseViewCart =			2;						// segundos hasta que la cesta se cierra tras mostrarla voluntariamente

    this.idCartBasket =					'cart_basket';
    this.idInviteInput = 				'email_header';
    this.idInviteForm =					'registerinvite';
    this.idMiniCartBox =				'miniCartBody';
    this.idMiniCartLateralShadow =		'#mini-cart .lateralshadow'
    this.hasMiniCartShadows=			false;
    this.b_inviteDefault = 				true;
     //version
       this.version =				3.0;				//modificar version al crear un nuevo metodo - WEB-183 - 3.0
       													//cambiar id - bug apadrinamiento - 2.1
       this.setVersion(this.version, 'PrivaliaMenuheader');
       this.invite();

       this.setShowLoad(false);
  },

  aboutToDelete: function (div) {
    new Effect.Morph(div, {
      style: 'background:#FFCFCF',
      duration: 0.4
    });
  },

  notToDelete: function (div) {
    new Effect.Morph(div, {
      style: 'background:#FFFFFF',
      duration: 0.2
    });
  },

  /**
   * Premaramos el formulario de apadrinar
   */
  invite: function(){
    if ($(this.idInviteInput) !== null){
      $(this.idInviteInput).observe('click', this.clearInvite.bind(this));
      $(this.idInviteInput).observe('blur', this.resetInvite.bind(this));
      this.inviteValue = $(this.idInviteInput).value;
    }
  },
  //Reseteamos el formulario a su estado por defecto
  resetInvite: function () {
    if ($(this.idInviteInput).value == '') {
      Form.reset(this.idInviteForm);
    }
    },
    //Limpiamos el formulario
    clearInvite: function () {
       if (this.b_inviteDefault || $(this.idInviteInput).value == this.inviteValue) {
         $(this.idInviteInput).value = "";
             this.b_inviteDefault = false;
         }
    },

  /**
   * Crear el efecto del menu de rollover - rollout
   */
  /*menu_init: function() {
    var max = this.max;
    $$(this.target).each(function(li) {

      // inicializar
      divs = $(li).descendants();

      if(!$(li).hasClassName('active')) {
        divs.each(function(s) {
          switch($(s).inspect()) {
            case '<div>':
              $(s).setOpacity(0);
              $(s).setStyle({'display': 'block'});
              break;
            case '<a>':
              $(s).observe('mouseover',function() {
                vhermano = $(s).siblings();
                hermano = vhermano[0];
                $(hermano).setOpacity(0);
                new Effect.Opacity(hermano, {
                  from: 0,
                  to: max,
                  duration: 0.2
                })
              });
              $(s).observe('mouseout',function() {
                vhermano = $(s).siblings();
                hermano = vhermano[0];
                $(hermano).setOpacity(max);
                new Effect.Opacity(hermano, {
                  from: max,
                  to: 0,
                  duration: 0.4
                })
              });
              $(s).observe('click',function() {
                $(s).blur();
              });
              break;
          } // switch
        });
      } // end hasclassname
    });
  },
  */


  //Mostrar cesta al pasar por zona activa
    initViewCart: function(){
 	   //comprovamos si esta abierta, si no la mostramos
 	   if(!this.b_open){
 		 this.viewcart();
 	   	} else {
 		   if(this.autoClose != null){
 		   // anulamos el setTimeout, por si estuviera contando
 			window.clearTimeout(this.autoClose);
 		   } else {
 			 // cerramos la cesta
 			 this.viewcart();
 		   }
 	   }
    },

    /**
     * Iniciamos temporizador y cerramos
     */
    timeOutViewCart: function() {
		if(this.b_open){
			this.autoClose = this.setActionTimeOut(this.viewcart.bind(this), this.i_segCloseViewCart);
		}
    },
  /**
   * Global - Ajusta el tamanyo de las sombras del carrito
   */
  setMiniCartShadows: function (){
    if($(this.idMiniCartBox)!== null && this.hasMiniCartShadows == false){
      // obtenemos la altura del carrito
      var i_boxHeight = $(this.idMiniCartBox).getHeight();
      // ajustamos la altura
      i_boxHeight = i_boxHeight - 12;
      // fijamos los tamanyos de las sombras en funcion
      var shadows = $$(this.idMiniCartLateralShadow);
      var i_sLength = shadows.length;
      for (var i=0; i<i_sLength; i++){
        shadows[i].setStyle({height: i_boxHeight + 'px'});
      }
      this.hasMiniCartShadows = true;
    }
  },

  /**
   * asignar texto para la etiqueta ocultar
   */
  setTxtHide: function (txt) {
    this.txt_hide = txt;
  },

  /**
   * asignar texto para la etiqueta mostrar
   */
  setTxtShow: function (txt) {
    this.txt_show = txt;
  },

  /**
   * Submit Personalizado para apadrinar desde el header
   * @param {Object} idForm
   */
  submitInvite: function(idForm){
    return this.submit(idForm, this._submitInvite.bind(this));
  },
  _submitInvite: function(response){
        this.stopTimeout();
        this.parseResponse(response);
        if (this.statusOK()) {
          // mostrar tooltip ok
          new PrivaliaTooltip(this.idInviteInput, MSGCODE[this.getResTextcodes()], {
          //new PrivaliaTooltip(this.idInviteInput, 'Hemos enviado un email a ' + $(this.idInviteInput).value , {
            status: 'ok',
            target: 't',
            tip: 'b',
            showNow: true,
            closeBtn: false,
            autoClose: 4,
            type: 'text'
          });
          Form.reset($(this.idInviteForm));
        }
        else {
          //Notify en pagina principal y gestion de errores
      this._endSubmitInviteError();
        }
    this.stopLoad();
    this.idFormActual = '';
    },

  /**
     * Tras hacer un submit en el form para invitar, nos devuelve un error. Tratamos los errores y los mostramos
     */
  _endSubmitInviteError: function() {
    this._errorTreatment();		// gestiona los errores retornados y los aplica a cada campo erroneo
  	this._clickInputError();	// aplicar Click: una vez se cambie el campo, se quite el estilo del error
  	this._keyupInputError();	// aplicar keyUp: una vez teclee algo en el campo, se quite el estilo del error
    },

  /**
   * Mostrar u ocultar el contenido de la cesta
   */
  viewcart: function() {
    var seg_open = 0.8;
    var seg_close = 0.6;

    // anulamos el setTimeout, por si estuviera contando
   // window.clearTimeout(this.autoClose);

    if(!this.b_open) {
      // No esta abierta, la abrimos
      if($(this.idCartBasket)!== null){
        $(this.idCartBasket).slideDown({
          duration: seg_open,
          afterFinish: this._endViewcart.bind(this)
        });
      }
      this.b_open = true;
    }
    else if(!this.b_AddToCart){
      // cerramos la cesta solo si no estamos anyadiendo producto
      $(this.idCartBasket).slideUp({
        duration: seg_close
      });

      this.b_open = false;

      if(this.autoClose != null){
        // anulamos el setTimeout, por si estuviera contando
		window.clearTimeout(this.autoClose);
	   }
    } else{
    	//Si la cesta esta abierta y anyadimos al carrito
    	 this.scrollToCart();
    }
    this.b_AddToCart = false;
  },

  /**
   * funcion callback que hace despues de la transicion de mostrar la cesta de la compra
   */
  _endViewcart: function () {
    // Ajustamos el tamanyo de las sombras a la altura del carrito
    this.setMiniCartShadows();

    // hacemos scroll hacia la cabecera, para que se vea la cesta
    this.scrollToCart();
  },

  /**
   * hacemos scroll hacia la cabecera, para que se vea la cesta
   */
  scrollToCart: function () {
    var divBody = 'page',
	scrollY = 0,
    seg = 2;

    if(this.b_topScroll) {
      // obtenemos altura del scroll
      scrollY = document.viewport.getScrollOffsets()[1];

      // si ha scrolleado muy abajo y no ve la cabecera, le subimos parriba
      if(scrollY >= 160) {
        Effect.ScrollTo(divBody, {
          duration: 2
        });
      }
    }
  },

  /**
   * Proceso ajax para eliminar un producto desde el carrito
   * Sustituye al original de mycart.js
   */
  _callDeleteOrderLine: function (pk, div) {
    if(pk != '') {
      var url = '/mycart/deleteProduct';

      new Ajax.Request(url, {
        parameters: 'product=' + pk,
        onComplete: (function(response) {
          this.parseResponse(response);
          if(this.statusOK()) {
            this.numProducts--;
            // eliminar direccion de la pagina html
            this._deleteOrderLineHtml(div);
            // actualizar el carrito
            this.reload();
          }
        }).bind(this),
        onFailure: (function() {
          if(this.debug) this.errorMessage('03');
        }).bind(this)
      });
	  // reseteamos a false para evitar problemas cuando anyades un producto y luego lo eliminas de la cesta
      this.b_AddToCart = false;
      // anulamos el setTimeout, por si estuviera contando
      window.clearTimeout(this.autoClose);
    }
  }
});

/**
 *  privalia.microsites.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 90-privalia.base.js
 * @revision: 	1.0
 */

/**
 * PrivaliaJsonMicrosites - Common
 * =========================================
 * @modified: 	Marcos		(8-06-11)
 */
var PrivaliaJsonMicrositesBase = Class.create(PrivaliaBase, {
	initialize: function($super) {
		$super();

		this.campaign_PK = 				'';
		this.category_PK =				'';
		this.product_PK = 				'';
		this.url_birthday =				'';
		this.cssInstallments =			'installments';		// recoge la clase destinada a las parcelas
		this.cssNoInstallments =		'no-installments';     // recoge la clase no destinada a las parcelas
		this.id_description =			'campaign_description'; // div donde se vuelca la descripcion de la campanya
		 //version
	   	this.version =				1.2;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaJsonMicrositesBase');
	},

	/**
	 * Microsites - Metodo que permite la continuacion de la compra
	 */
	adultConditionsAccepted: function(modal, PK){
		//Llamada Ajax para cambiar el flag
		var url_changeAdultCondition = "/microsites/acceptAdultCampaign/campaign/" + PK;
		//cambiamos el estado del flag de condiciones
		this._callAcceptAdultConditions(url_changeAdultCondition, modal);
	},


	/**
	 * Microsites - Construye la pagina con los datos pasados por json previamente
	 */
	buildPage: function(generate) {
		switch(generate) {

			// Microsite Birthday
			case 'homebirthday':
				this.generateHtml({
					pushData: this.pushBirthday
				});
				break;

			// Menu Categorias
			case 'menu':
				this.generateHtml({
					pushData: this.pushMenu
				});
				this.initMenu();
				break;

			// home de campanya
			case 'homecampaign':
				this.generateHtml();

				// obtenemos breadcrumb dinamico
				this.getDataBreadcrumb(this.getResData());
				this.buildBreadcrumb();

				// si no recibimos descripcion de la campanya ocultamos el bloque
				this.hasDescription();

				// selling services - venta de servicios
				// primero comprobamos si vta de servicio esta activo para el pais
				if (Country.getService()){
					var Service = new PrivaliaSellingServices(this.getResData());
				}

				// Campanyas para Adultos
				// Compruebo si el usuario ya ha aceptado las condiciones
				if (this.getResData().campaign_data !== undefined){
				if (this.getResData().campaign_data.adult_campaign_accepted === 0){
					//TODO: Marcos - Pasar la modal como referencia
					if(typeof(modalAcceptAdultConditions) !== undefined){
						modalAcceptAdultConditions.open();
						}
					}
				}
				// Modulo Social
				var Social = new PrivaliaSocial(this, 'home', this.getIsAdultCampaign(this.getResData()));

				break;
			default:
				this.generateHtml();
				break;
		}
	},

	/**
	 * Microsites - Metodo auxiliar para conseguir el campaignPK
	 */
	getCampaignPK: function () {
		if(this.campaign_PK == '') {
			this.campaign_PK = this.getResData().product_data.campaign_PK;
		}
		return this.campaign_PK;
	},

	/**
	 * Microsites - Comprueba si la categoria es la actual/activa,
	 * y devuelve el CSS correspondiente a "activo" para el menu
	 */
	getCssActiveMenu: function (categoryPK, level) {
		var activeCategoryPK = this.getCategoryPK(),
		css = '';

		if(activeCategoryPK == categoryPK) {
			css = 'active';
			if(level == 1) {
				css += ' down';
			}
	}
		return css;
	},

	/**
	 * Microsites - Obtiene el category PK desde la URL
	 */
	getCategoryPK: function () {
		if(this.category_PK == '') {
			var url = this.getUrl(),
			vtmp = url.split("/");

			// buscar la posicion 8 directamente es delicado pq si varia la def de la url,
			// no funcionara. Pero por ahora no hay otra
			// ejemplos de URL:
			// http://it.privalia.loc/microsites/fittingroom/campaign/4671/category/95421/product/469031 --> 95421
			// http://it.privalia.loc/microsites/shopWindow/campaign/4671/category/24555 --> 24555
			this.category_PK = vtmp[8];
		}
		return this.category_PK;
	},

	/**
	 * Microsites - Devuelve el productPK del producto
	 */
	getProductPK: function () {
		if(this.product_PK == '') {
			this.product_PK = this.getResData().product_data.product_PK;
		}
		return this.product_PK;
	},

	/**
	 * si no recibimos descripcion de la campanya ocultamos el bloque
	 */
	hasDescription: function(){
		if (this.getResData().campaign_description !== undefined) {
			if (this.getResData().campaign_description.campaign_description == ''){
				if ($(this.id_description) != null){
					$(this.id_description).addClassName('hidden');
				}
			}
		}

	},

	/**
	 * Microsites - Hacer que las categorias con submenu sea clicable y abra/cierre el submenu
	 */
	initMenu: function () {
		$$('#navcampaign h4 a').each(function(item) {
			// elemento li de la categoria
			var maxparent = $(item).ancestors()[1];
			$(item).observe('click', function() {
				// antes de nada comprobamos si tiene subcategorias
				if(!$(item).hasClassName('none')) {
					// si esta abierto
			        if($(maxparent).hasClassName('open')) {
			        	//quitamos la clase
			            $(item).removeClassName('open');
			        }
			        // si esta cerrado
			        else {
			        	//cerramos la categoria que este desplegada
			        	$$('.open').each(function(item) {
			        		$(item).removeClassName('open');
			        	});
			        	//abrimos la actual
			        	$(maxparent).addClassName('open');
			        }
				}
			});

		});
	},

	/**
	 * Microsite de Aniversario - Volcado de datos
	 */
	pushBirthday: function (dataJson, index) {
		var target = this.getTarget();

		if (target == "page_data"){
			if(dataJson.is_member_birthday != false){
				this.url_birthday = dataJson.video_url;
				var params = {wmode:"transparent"};
				swfobject.embedSWF(this.url_birthday, "birthday-wrapper", "800", "598", "9.0.0","/front/get/swf/expressInstall.swf",false,params);
			}else{
				this.redirectToMicrosites();
			}
		}

		// sumo datos a volcar
		this.addBuilt(dataJson);
	},

	/**
	 * Microsites - Carga los menus laterales de las campania
	 * @param {Object} dataJson
	 * @param {Object} index
	 */
	pushMenu: function (dataJson, index) {
		var target = this.getTarget(),
		sublist = '',
		v_submenuOptions = [],
		optionTpl = {},
		option = {},
		list = {},
		subTpl = {};

		// comprobar si tiene hijos: entonces tiene submenu
		if(dataJson.wcategory_childs.size() > 0) {
			var tpl = TPL_HOMECAT_MENU_OPTION;

			// marcamos el primero como abierto
			if(index == 0){
				dataJson.firstCategory = 'open';
			}

			// anyadimos la opcion de TODAS
			option = {
					wcategory_name: this.getTxt('all'),
					wcategory_url: dataJson.wcategory_url
				};
				subTpl = new Template(TPL_HOMECAT_SUBMENU);
				sublist += subTpl.evaluate(option);

			// array de los hijos: submenu
			v_submenuOptions = dataJson.wcategory_childs;
			v_submenuOptions.each(function(option) {
				subTpl = new Template(TPL_HOMECAT_SUBMENU);
				sublist += subTpl.evaluate(option);
			}, this);
			dataJson.wcategory_url = '';
			dataJson.submenu = sublist;
		}
		else {
			// no tiene hijos
			tpl = TPL_HOMECAT_MENU_OPTION;
			// si no tiene subcategorias lo marcamos con la clase correspondiente
			dataJson.css_status = 	'none';
		}


		optionTpl = new Template(tpl);
		list.option = optionTpl.evaluate(dataJson);

		// sumo datos a volcar
		this.addBuilt(list);
	},


	/**
	 * Microsites - deteccion de pais para el chat
	 */
	setCountry: function(country) {
		this.isoCountry = country;
	},

	/**
	 * Microsites - Muestra los precios parcelados para brasil
	 * Oculta el precio normal en la posicion comun al resto de paises
	 */
	showInstallments: function(){
		// elimina la clase hidden y muestra el precio parcelado encima del precio normal
		$$('.'+ this.cssInstallments).invoke('removeClassName', 'hidden'); 		// elimina hidden
		// oculta el precio sin parcelar tal y como aparece en el resto de fronts diferentes a brasil
		$$('.'+ this.cssNoInstallments).invoke('addClassName', 'hidden'); 		// ocultar bloques normal
	},

	/**
	 * Microsites - Llamada interna para cambiar el flag de adultos
	 * @param {Object} url - contiene la campanya a cambiar
	 * @param {Object} modal - modal de aceptacion de condiciones
	 */
	_callAcceptAdultConditions: function(url, modal){
		new Ajax.Request(url, {
			onComplete: (function(response){
				this.parseResponse(response);
				if (this.statusOK()) {
					//si todo va bien, cerramos la modal y checkeamos
					modal.close();
				}
			}).bind(this)
		});
	}

});

/**
 * PrivaliaMicrosites - Common
 * =========================================
 * requieres: 	privaliaCore*, privaliaBase, privaliaJsonMicrosites
 * @modified: 	Marcos	(28-06-11)
 */
var PrivaliaMicrositesBase = new Class.create(PrivaliaJsonMicrositesBase, {
	initialize: function($super) {
		$super();

		this.code_diffCampaign =	'msg0150025'; // no se puede anyadir productos de diferentes campanyas
		this.code_productLimit =    'msg0250022'; // se han anyadido mas productos de los permitidos

		this.btnAdd =			'button-container';
		this.btnTooltipAdd =	'tooltip-button-container';
		this.divQuantity =		'quantity_container';
		this.idSelectQuantity =	'quantity';
		this.idQuantityCombo = 	'';

		this.v_availabilityText = 	[];

		this.b_scrollToNotify =		true;				// forzamos que en la seccion microsites al mostrar una notificacion scrolear al mensaje, en el core esta a false

		//version
	   	this.version =				1.1;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaMicrositesBase');
	},

	/**
	 * Microsites - Evento para agregar un producto al carrito.
	 * Hace el submit del stockPK y muestra el boton verde de iniciar compra
	 */
	addToCart: function (form) {
		// no tiene pedidos que reabrir. Seguir proceso habitual
		this.loadText('adding product');
		this.originalObj = this;
		this.originalObj.reloading = true;
		this.setQuantitySelect(form);

		this.submit(form, this._submitAddToCart.bind(this));
	},

	/**
	* Microsites - Metodo auxiliar para checkear el estado del boton addtocart
	*/
	btnAddToCartIsEnabled: function (form) {
		if(form == 'relatedProductForm'){
			return !$(this.btnTooltipAdd).hasClassName('disableButton');
		}
		else if(form.startsWith('productForm_')){
			var sufix = form.split("_")[1];
			if($(this.btnAdd+'_'+sufix) != null){
				return !$(this.btnAdd+'_'+sufix).hasClassName('disableButton');
			}
		}
		else if(form.startsWith('productForm')){
			if($(this.btnAdd) != null){
				return !$(this.btnAdd).hasClassName('disableButton');
			}
		}
	},

	/**
	 * Microsites - Llamada a Facebook para el connect del fanbox
	 */
	connectFanbox: function(){
		switch(Country.getIso()){
			case 'es':
				$('fanbox').update('<iframe scrolling="no" frameborder="0" width="280" height="160" src="http://www.facebook.com/connect/connect.php?id=102682692605&connections=4&css=http://es.privalia.com/front/get/css/fanbox.css" allowtransparency="true"></iframe>');
				break;

			case 'it':
				$('fanbox').update('<iframe scrolling="no" frameborder="0" width="280" height="160" src="http://www.facebook.com/connect/connect.php?id=141691667282&connections=4&css=http://it.privalia.com/front/get/css/fanbox.css" allowtransparency="true"></iframe>');
				break;

			case 'mex':
				$('fanbox').update('<iframe scrolling="no" frameborder="0" width="280" height="160" src="http://www.facebook.com/connect/connect.php?id=301373534292&connections=4&css=http://mex.privalia.com/front/get/css/fanbox.css" allowtransparency="true"></iframe>');
				break;

			case 'br':
				$('fanbox').update('<iframe scrolling="no" frameborder="0" width="280" height="160" src="http://www.facebook.com/connect/connect.php?id=120039972284&connections=4&css=http://br.privalia.com/front/get/css/fanbox.css" allowtransparency="true"></iframe>');
				break;
		}
	},

	/**
	 * Microsites - deshabilitar boton anadir a carrito
	 */
	disableAddButton: function() {
		if ($(this.btnAdd) !== null) {
			if (!$(this.btnAdd).hasClassName('disableButton')) {
				$(this.btnAdd).addClassName('disableButton');
			}
		}
	},

	/**
	 * Microsites - Descripcion de los diferentes errores que puede darse
	 */
	getFittingroomErrors: function (code) {
		return this.v_fittingroomErrors[code];
	},

	/**
	 * Microsites - deshabilitar el select de la cantidad
	 */
	hideQuantity: function () {
		if($(this.divQuantity)!==null){
			if(!$(this.divQuantity).hasClassName('disableButton')) {
				$(this.divQuantity).addClassName('disableButton');
				$(this.idSelectQuantity).disabled = true;
			}
		}
		this.fitroom_step = 1;
	},

	/**
     * Microsites - Recogemos el array de copys correspondientes a los textos de la disponibilidad de productos
     */
    setAvailabilityText: function(msg){
        this.v_availabilityText = msg;
    },

	/**

	/**
	 * Microsites - Metodo para fijar el target del tooltip cuando se limita la cantidad
	 * @param {Object} form
	 */
	setQuantitySelect: function(form){
		if(form == 'productForm'){
			this.idQuantityCombo = 'quantity';
			this.targetLimitTooltip = 'r';
			this.tipLimitTooltip = 'l';
		}else if(form == 'relatedProductForm'){
			this.idQuantityCombo = 'tooltip-quantity';
			this.targetLimitTooltip = 'r';
			this.tipLimitTooltip = 'l';
		}else{
			var sufix = form.split("_")[1];
			this.idQuantityCombo = 'productForm_'+sufix;
			this.targetLimitTooltip = 'b';
			this.tipLimitTooltip = 't';
		}
	},
	/**
	 * Detalle de Producto - Creamos el tooltip de error para cuando se supera el numero maximo de productos
	 */
	showProductLimitTooltip: function(code){
		var id = this.idQuantityCombo,
		target = this.targetLimitTooltip,
		tip = this.tipLimitTooltip;

		// creamos tooltip
		if(this.idQuantityCombo != ''){
			var Tip = new PrivaliaTooltip(id, MSGCODE[code], {
				target: target,
        		tip: tip,
				closeBtn: 	false,
				showNow: 	true,
				status:		'error',
				autoClose:	8
			});
		}
	},

	/**
	 * Detalle de Producto - Callback tras pulsar el boton anyadir producto al carrito
	 */
	_submitAddToCart: function (response) {
		this.parseResponse(response);
		this.stopTimeout();

		if(this.statusOK()) {
			// Actualiza la cesta de compra en la cabecera (funcion en global.js)
			reloadCart();


			// volver al paso 1
			this.hideQuantity();
			this.disableAddButton();	// deshabilitar boton anadir a carrito

			this.originalObj.reload();
			//TODO: Eliminar esta referencia directa a ProductTooltip
			if(typeof(ProductTooltip) != 'undefined'){
				ProductTooltip.close();
			}
		}else {
			//TODO: Controlar el error 400, salir de la sesion
			var code_errorAdd = this.getResTextcodes();
			// si devuelve el error: msg0250022 (limite de productos por compra superado)
			if (code_errorAdd == this.code_productLimit) {
				this.showProductLimitTooltip(code_errorAdd);
			}else if (code_errorAdd == this.code_diffCampaign) {
			// si devuelve el error: msg0150025 (no se puede anyadir productos de diferentes campanyas)
				var description = this.getTxt(code_errorAdd);
				this.notify(this.getResTextcodes(), description);
			}else{
				this.endSubmitError();
			}
		}
		this.stopLoad();
		this.stopLoadText();
	}

});
/**
 * PrivaliaMicrositesJsonFilters - Common
 * =========================================
 * @modified: 	Cristina	(10-06-11)
 */
var PrivaliaMicrositesJsonFilters = Class.create(PrivaliaBase, {
	initialize: function($super) {
		$super();

		// configurable
		this.i_seconds =			5;							// segundos que han de transcurrir hasta ocultar menu categoria
		this.i_secondsToClose =			1;							// segundos que han de transcurrir hasta ocultar un menu
		this.i_catsPerBlock =			7;							// numero de categorias a mostrar por linea en el menu
		this.b_openMenu = 			false;						// controla si el menu esta abierto
		this.cssMenuSelector = 			'.option';					// capa con la que controlamos el comportamiento de los menus de filtrado
		this.categoriesMenu = 			'';

		// interno
		this.b_hasSubcats =			false;						// la categoria seleccionada tiene subcategorias
		this.b_timeout = 			false;
		this.b_hasFooterMenu =			true;						//por defecto generamos el menu de categorias en el footer.
		this.defaultCategory =			'';							// categoryPK cargado por defecto desde la URL
		this.defaultSubcategory =		'';							// subcategoryPK cargado por defecto desde la URL
		this.idFilterProducts = 		'filter-products';
		this.idSelectedMenu =			'';							// id del menu de filtros activo
		this.idOldCatMenu = 			'';							// id de la categoria del menu seleccionado
		this.idSizeFilterList = 		'product_filter_cont';
		this.idFilterToShow =			'menuCategory';   			// id del menu a mostrar inicialmente
		this.idFooterMenu =			'divCategoriesMenu';
		this.subcategoryMenu =			'filterSubcategory';		// menu del listado de subcategorias
		this.subcategoryList =			'subcategories_data';		// listado de subcategorias

		this.filterTimeout =			null;

		this.closeDropDownMenu =		null;						// guarda el setTimeout que cierra el menu desplegado
		// obtenemos la categoria por defecto de la URL
		this.defaultPK =				this.getUrlParamValue('category');
		//version
        this.version =					1.4;
        this.setVersion(this.version, 'PrivaliaMicrositesJsonFilters');
	},

	/**
	 * Le atribuimos una estructura html con variables json para montar el listado de subcategorias
	 */
	buildFilterOption: function (data) {
		var optionTpl = new Template(TPL_MENU_OPTION),
		html = optionTpl.evaluate(data);
		return html;
	},

	/**
	 * Microsites - Construye la pagina con los datos pasados por json previamente
	 */
	buildPage: function(generate) {
		switch(generate) {
			case 'filters':
			default:
				this.generateHtml({
					pushData: this.pushCategoriesFilter
				});

				// en el proceso del push ya deberiamos haber obtenido la categoria/subcategoria que hay que seleccionar
				// Actualmente no se seleccionan categorias o subcategorias por defecto
				if(this.defaultCategory != '') {
					// seleccionamos por defecto la categoria
					this.selectCategoryById(this.defaultCategory);

					if(this.b_hasSubcats) {
						// seleccionamos por defecto la categoria
						this.selectSubcategoryById(this.defaultSubcategory);
					}
				}

				// Generamos el menu de categorias y subcategorias en todos los sitios que sea necesario
				// pasandole como parametro el id del div donde lo volcaremos
				if (this.categoriesMenu !== ''){
					this.setMenu(this.categoriesMenu);
				}
				// Generamos el menu de categorias y subcategorias en el footer
				if(this.b_hasFooterMenu){
					this.setMenu(this.idFooterMenu);
				}
				this.initMenuCats();
				// marcamos en los posibles menus la categoria seleccionada
				this._selectInMenu(this.defaultPK);
				// mostrar desplegada la categoria definida
				this.showCategoryMenu();

				// controlamos el comportamiento de los menus segun el puntero del raton
				this.pointerFocus(this.cssMenuSelector);
				break;
		}
	},

	/**
	 * detectar si la categoria pasada por defecto por URL es una categoria o subcategoria.
	 * En caso de subcategoria, guardamos su parent (categoria padre)
	 */
	checkIfCategory: function (i_categoryPK, v_subcategories) {
		if(this.defaultCategory == '') {
			// ver si la categoria pasada por URL efectivamente es una categoria
			if(this.defaultPK == i_categoryPK) {
				this.setDefaults(i_categoryPK, '');
			}
			//  no es categoria, vemos si lo que se ha pasado es una subcategoria de esta categoria
			else {
				this.checkIfSubcategory(this.defaultPK, v_subcategories);
			}

			// si hemos detectado si es cat o subcat, aprovechamos el array de subcats para volcar lista de subcats
			if(this.defaultCategory != '') {
				this.buildSubcategoriesFilter(v_subcategories, i_categoryPK);
			}
		}

	},

	/**
	 * Comprueba si subcatPK se encuentra en el array de subcategorias
	 */
	checkIfSubcategory: function(subcatPK, v_subcategories) {
		var b_found = false,
		i = 0,
		max = v_subcategories.length;

		if(subcatPK != '') {
			while(!b_found && i < max) {
				var o_subcat = v_subcategories[i];
				if(o_subcat.wcategory_PK == subcatPK) {
					// se ha encontrado la subcategoria. guardamos como subcat y guardamos su cat padre
					this.setDefaults(o_subcat.wcategory_parent_PK, o_subcat.wcategory_PK);
					b_found = true;
				}
				i++;
			}
		}
	},

	/**
	 * vuelca en el listado de subcategorias
	 */
	buildSubcategoriesFilter: function (v_subcategories, categoryPK) {
		var subcategory = {},
		html = '';
		if(Object.isArray(v_subcategories)) {
			// miramos si tiene subcategorias
			if(v_subcategories.size() > 0) {
				this.b_hasSubcats = true;
				// anyadimos la opcion de TODAS
				subcategory = {
					wcategory_PK: 	categoryPK,
					wcategory_name: this.getTxt('all'),
					prefix:			'sub'
				};
				html = this.buildFilterOption(subcategory);

				// por cada uno de ellas
				v_subcategories.each(function(subcategory) {
					subcategory.prefix = 'sub';
					html += this.buildFilterOption(subcategory);
				}, this);

				if(html != '') {
					// volcamos el array de subcategorias
					$(this.subcategoryList).update(html);
				}
				if($(this.subcategoryMenu).hasClassName('hidden')){
					$(this.subcategoryMenu).removeClassName('hidden');
				}
				// aplicamos clase subcategoria al contenedor de los filtros para controlar el caso que se activen los 4 filtros a la vez
				$(this.idFilterProducts).addClassName('subcategory');
			}
			// si la categoría no tiene hijos
			else{
				// sustituimos el texto "todas" por "--"
				//$(this.subcategoryList+'_label').update('--');
				if($(this.subcategoryMenu) !== null){
				$(this.subcategoryMenu).addClassName('hidden');
				}else{
					if (typeof(DGuardian) != 'undefined') {
		                DGuardian.log('PrivaliaMicrositesJsonFilters.buildSubcategoriesFilter@ - Listado de Subcategorias no encontrado');
		            }
				}
			}
		}
	},

	/**
	 * Controla si existen subcategorias dentro de una categoria seleccionada y
	 * las vuelca en el listado de subcategorias
	 */
	checkSubcategoriesFilter: function(categoryPK){
		var data = this.getResData(),
		b_subcategories = true;

		if(categoryPK != ''){
			// por cada una de la categorias buscamos la que tenga la misma PK y comprobamos si tiene subcategorias para cargar
			data.categories_data.each(function(item){

				// si las pk coinciden
				if(item.wcategory_PK == categoryPK){
					// volvemos a montar la lista de subcategorias
					this.buildSubcategoriesFilter(item.wcategory_childs, categoryPK);
				}
			}, this);
		}

		return b_subcategories;
	},
	/**
	 * Comprobamos si la subcategoria seleccionada en el menu existe en las subcategorias del menu combo , sino hay que regenerar el menu de subcats y marcar el de categoria.
	 */
	checkSubcategoriesFilterInMenu: function(categoryPK,parentID){
		if(categoryPK != '' && parentID != ''){
			var b_isInMenu = false,
			o_subcat = '',
			b_viewSubCats = $(this.subcategoryMenu).hasClassName('hidden'); // comprobamos si el menu de subcategoria esta oculto
			// si esta visible comprobamos si la la subcategoria seleccionada existe
			if(!b_viewSubCats){
				$$('#'+this.subcategoryList+' li a').each(function(item) {
					// recorremos el menu de subcategorias recogiendo la id de la subcategoria
					var id = $(item).identify();
					id = id.split('subcategory_')[1];
					// comparamos la id de la subcategoria en el menu combo con la id de la subcategoria clicada en cualquiera de los menus
					if(id == categoryPK){
						//si coinciden las id es que la categoria seleccionada corresponde a la categoria actual
						b_isInMenu = true;
					}
				});
			}
			// si no esta en el menu de subcategoria hemos de regenerar el menu pasandole los parametros correctos
			if(!b_isInMenu){
				var data = this.getResData();
				//recorremos el array de categories_data y nos quedamos con la categoria padre de la subcategoria seleccionada
				data.categories_data.each(function(item){
					if(item.wcategory_PK == parentID){
						o_subcat = item;
					}
				}, this);
				// regenerar el menu de subcategorias pasandole los parametros correcto
				this.buildSubcategoriesFilter(o_subcat.wcategory_childs, parentID);
			}
		}
	},

	/**
	 * Accion de cerrar el menu abierto
	 */
	closeAction: function(){
		this.closeFilter(this.idSelectedMenu);
	},

	/**
	 * accion cerrar lista de categorias
	 */
	closeCategoryMenu: function(){
		this.closeFilter(this.idFilterToShow); //Todo mirar por que no va con this.idFilterToShow
	},

	/**
	 * efecto para cerrar lista de categorias
	 */
	closeFilter: function (id) {
		if($(id) !== null){
			$(id).ancestors()[0].removeClassName('pushed');
			//this.toggleFilter(id);
			$(id).slideUp({duration:0.3});
			//nos guardamos la id para ocultarla posteriormente
			this.idSelectedMenu = '';
		}
	},

	/**
	 * Proceso para cerrar con efecto el menu abierto
	 */
	closeMenu: function() {
		if(this.idSelectedMenu != ''){
			// inicializamos el settimeout para el proceso de cerrar menu
			this.closeDropDownMenu = this.setActionTimeOut(this.closeAction.bind(this), this.i_secondsToClose);
		}
	},

	getData: function($super, page) {
		var url = this.getUrlGetData(page);
		$super(url);
	},

	/**
	 * Microsites - Constructor de URLs
	 * para getDatas a partir de la URL del navegador
	 */
	getUrlGetData: function (page) {
		var url = this.getUrl().toLowerCase(),
		urlGetData = '',
		urlProduct = '';

		switch(page) {
			// detalle de producto
			case 'filters':
			default:
				// se recoge la estructura campaign/XXX/category/XXX
				urlProduct = url.split("shopwindow/")[1];
				urlProduct = urlProduct.split("#")[0];
				urlGetData = "/microsites/getCategoryTree/" + urlProduct;
				break;
		}

		return urlGetData;
	},
	/**
	 * Shopwindow - Hacer que las categorias con submenu sea clicable y abra/cierre el submenu
	 */
	initMenuCats: function () {
		$$('#navigationLeft h4 a').each(function(item) {
			// elemento li de la categoria
			var maxparent = $(item).ancestors()[1];
			$(item).observe('click', function() {
					// si esta abierto
					if(!$(maxparent).hasClassName('open')) {
					$$('.open').each(function(item) {
						$(item).removeClassName('open');
					});
						//quitamos la clase
						$(maxparent).removeClassName('open');
					}
					// si esta cerrado
					else {
						//cerramos la categoria que este desplegada
						$$('.open').each(function(item) {
							$(item).removeClassName('open');
						});
						//abrimos la actual
						$(maxparent).addClassName('open');
					}
			});
		});
	},

	/**
	 * Volcado de categorias en el listado de categorias
	 */
	pushCategoriesFilter: function (dataJson, index) {
		var target = this.getTarget(),
		List = {},
		tpl = TPL_MENU_OPTION,
		optionTpl = new Template(tpl);
		// le atribuimos una estructura html con variables json para montar el listado de categorias
		
		List.option = optionTpl.evaluate(dataJson);

		// detectar si la categoria pasada por defecto por URL es una categoria o subcategoria
		this.checkIfCategory(dataJson.wcategory_PK, dataJson.wcategory_childs);

		// sumo datos a volcar
		this.addBuilt(List);
	},

	/**
	 * Reset del label del filtro de tallas
	 */
	resetLabelSizeSelect: function(){
		if($('product_filter_cont_label')!== null){
			$('product_filter_cont_label').update(this.getTxt('sizes'));
		}
	},
	/**
	 * Reset del label del filtro de orden
	 * Modificación realizada por: Naiara (30/05/2011)
	 * Basada en la función resetLabelSizeSelect
	 */
	resetLabelOrderSelect: function(){
		if($('orderList_label')!== null){
			$('orderList_label').update(this.getTxt('orderby'));
			//se le quita la clase 'active' al elemento del menú seleccionado
			$('orderList').select('li.active').invoke('removeClassName','active');
			
		}
	},

	/**
	 * reiniciamos el label de las subcategorias
	 */
	resetLabelSubcategories: function(category){
			this.selectSubcategoryById(category);
	},
	
	/**
	 * Metodo que se ejecuta cuando se hace click en una categoria/subcategoria
	 * @param {Object} obj
	 * @param {Object} category
	 */
	select: function (obj, category) {
		var idSelectedFilter = '',
		idFilter = '';
		if (obj !== undefined) {
			idSelectedFilter = $(obj).identify();
			//var category = id.split("_")[1]; // Todo: mirar porque no va y si se soluciona se puede eliminar el parametro category del select
			// marco la seleccion
			this._select(obj);
		}	
		if (category !== undefined) {
			// NEW: marcamos en los posibles menus la categoria selecionada
			this._selectInMenu(category);
			//actualizamos las subcategorias
			this.checkSubcategoriesFilter(category);
			this.resetLabelSubcategories(category);
		}
		//this.resetLabelSizeSelect();	(comentado x Naiara)
		// cierro la lista del filtro
		idFilter = $(idSelectedFilter).ancestors()[2];
		this.closeFilter($(idFilter).identify());
	},

	/**
	 * Dejamos seleccionado la categoria por defecto, que previamente hemos marcado con un estilo css
	 */
	selectById: function (categoryPK, prefix) {
		// id de la categoria en el filtro, para que lo seleccionemos por defecto
		if(categoryPK != '') {
			var idCategory = prefix + categoryPK;
			if ($(idCategory) != null){
				this._select($(idCategory));
			}
		}
	},

	/**
	 * Selecciona una categoria a partir del PK
	 * @param {Object} categoryPK
	 */
	selectCategoryById: function(categoryPK) {
		var prefix = 'category_';
		this.selectById(categoryPK, prefix);
	},

	/**
	 * Selecciona una subcategoria a partir del PK
	 * @param {Object} categoryPK
	 */
	selectSubcategoryById: function(categoryPK) {
		var prefix = 'subcategory_';
		this.selectById(categoryPK, prefix);
	},

	/**
	 * Metodo que se ejecuta cuando se hace click en una categoria/subcategoria de cualquiera de los menus
	 * @param {Object} parentID - wcategory_PK de la categoria padre
	 * @param {Object} category - wcategory_PK de la categoria seleccionada
	 */
	selectInMenu: function (category, parentID) {
		// recuperamos el objeto padre del menu combo, es decir la categoria
		var idObj = 'category_'+parentID,
		obj = $(idObj);
		// marco la seleccion
		this._selectInMenu(category);
		this.resetLabelSizeSelect();
		this.resetLabelOrderSelect(); //Línea anyadida por Naiara
		
		if($('filterCategory') != null){
		// TODO: toda esta parte se tendra que eliminar si finalmente desaparece el menu combo
		// marco la seleccion del menu combo TODO: a eliminar si finalmente desaparece este menu
		this._select(obj);
		//actualizamos las subcategorias del menu combo. TODO: a eliminar si finalmente desaparece este menu
		this.checkSubcategoriesFilterInMenu(category,parentID);
		//reiniciamos el label de las subcategorias del menu combo. TODO: a eliminar si finalmente desaparece este menu
			this.resetLabelSubcategories(category);
		// TODO: toda esta parte se tendra que eliminar si finalmente desaparece este menu
		}
		// nos vamos parriba
        $('breadcrumb').scrollTo();
	},
	/**
	 * Setea la PK categoria/subcategoria cargada desde URL
	 */
	setDefaults: function(cat, subcat) {
		this.defaultCategory = cat;
		this.defaultSubcategory = subcat;
	},
	/**
	 * Crea el menu de categorias y subcategorias pasandole como parametro el id
	 */
	setMenu: function (idDiv) {
		//Nos guardamos el id del menu para luego hacer el marcado
		this.idMenu = idDiv;
		//nos aseguramos que el div donde vamos a volcar el menu existe
		if ($(idDiv) != null){
			// nos quedamos con el objeto categories_data
			dataJson = this.getResData().categories_data;
			// declaramos divMenu que contendra el bloque del menu
			var divMenu = '',
			option = {},
			vLength = dataJson.size();
			for (var i=0; i<vLength; i++){
				// miramos si tiene subcategoria para hacer el submenu
				if(dataJson[i].wcategory_childs.size() > 0) {
					// declaramos sublist que contendra el bloque de las subcategorias dentro de la iteracion para que se limpie cada vez
					var sublist = '',
					tpl = TPL_CATMENU,
					v_submenuOptions = [];
					// anyadimos la opcion de TODAS
					option = {
							wcategory_name: this.getTxt('all'),
							id: this.idMenu,
							wcategory_url: dataJson[i].wcategory_url,
							wcategory_PK: dataJson[i].wcategory_PK,
							wcategory_parent_PK: dataJson[i].wcategory_PK,
							css_all: 'allOption'
					};
					var subTpl = new Template(TPL_SUBMENU);
					sublist += subTpl.evaluate(option);
					// TPL de categorias con subcategorias
					// array de los hijos: submenu
					v_submenuOptions = dataJson[i].wcategory_childs;
					v_submenuOptions.each(function(option) {
						// TPL de las subcategorias
						subTpl = new Template(TPL_SUBMENU);
						option.id = idDiv;
						sublist += subTpl.evaluate(option);
					}, this);
					dataJson[i].submenu = sublist;
				}
				else {
					// no tiene subcategorias
					tpl = TPL_CATMENU;
					dataJson[i].css_status = 	'none';
				}
				// comprobamos si es la ultima columna de la fila para hacer los cambios correspondientes
				if (i==this.i_catsPerBlock-1){
					dataJson[i].clearing = 'clear';
					dataJson[i].last = 'last';
				}else{
					dataJson[i].clearing = 'hidden';
				}
				dataJson[i].id = idDiv;
				// vamos montando el menu con la plantilla correspondiente
				var optionTpl = new Template(tpl);
				divMenu += optionTpl.evaluate(dataJson[i]);
			}
			// montamos el menu en el div con id pasado por marametro
			$(idDiv).update(divMenu);
		}
	},

	/**
	 * muestra el menu categorias al entrar y lo oculta pasados i_seconds segundos
	 */
	showCategoryMenu: function(){
		// despliega el menu pasado por parametro
		this.showFilter(this.idFilterToShow);
		// tiempo que va a pasar antes de que se cierre el menu
		this.filterTimeout = this.setActionTimeOut(this.closeCategoryMenu.bind(this), this.i_seconds);
	},

	/**
	 * Realiza la accion de desplegar/mostrar el menu pasado por parametro
	 */
	showFilter: function (id) {
		if($(id) !== null){
			if($(id).ancestors()[0] != undefined){
				var parent = $(id).ancestors()[0];
				parent.addClassName('pushed');
				if (!$(parent).hasClassName('disable')){
					//this.toggleFilter(id);
					$(id).slideDown({duration:0.3});
					//nos guardamos la id para ocultarla posteriormente
					this.idSelectedMenu = id;
				}
			}
			else{
				$(id).slideDown({duration:0.3});
				//nos guardamos la id para ocultarla posteriormente
				this.idSelectedMenu = id;
			}
		}
	},

	/**
	 * Metodo para la gestion del drop-down del filtro de tallas
	 */
	sizeSelectDrop: function(id){
		var idList = this._updateLabelFilter(id);
		this._updateListFilter(this.idSizeFilterList, id);
	},
	/**
	 * Controla el comportamiento del dropdown de filtrado segun donde este el puntero (#paramid or .paramclass)
	 */
	pointerFocus: function(param){
		var item = $$(param);
		// por cada elemento encontrado
		for (var i = 0; i < item.length; i++) {
			// asignamos el comportamiento segun la accion
			item[i].observe('mouseover', this.voidCloseMenu.bind(this));
			item[i].observe('mouseout', this.closeMenu.bind(this));
		}
	},

	/**
	 * Cancela el proceso de cerrar el menu abierto en caso de estar el puntero encima del menu
	 */
	voidCloseMenu: function() {
		if(this.closeDropDownMenu != null){
			// anulamos el setTimeout
			window.clearTimeout(this.closeDropDownMenu);
		}
	},

	/**
	 * Actualizar el texto del filtro con la nueva seleccion
	 */
	_select: function (obj) {
		var idList = this._updateLabelFilter(obj);
		this._updateListFilter(idList, $(obj).identify());
	},
	/**
	 * Marcar la seleccion en todos los menus
	 * * @param {Object} cssPK - ID de la cat/subcat con la que estan marcadas por clase css en todos los menus
	 */
	_selectInMenu: function (cssPK) {
		var css = 'active',
		css_open = 'open';
		//marcamos todas las subcategorias que tengan la clase
		$$('.js-catPK_'+cssPK).each(function(item) {
			$(item).addClassName(css);
			//marcamos la categoria padre como abierta
			var father = $(item).ancestors()[2];
			if($(father).hasClassName('listCategoryNavigation')){
				$(father).addClassName(css_open);
			}
		});
		//desmarcamos todas las subcategorias que tengan la clase
		if(this.idOldCatMenu != '' && this.idOldCatMenu != cssPK){
			$$('.js-catPK_'+this.idOldCatMenu).each(function(item) {
				$(item).removeClassName(css);
			});
		}
		// nos guardamos en memoria la idPK marcada para luego desmarcarla
		this.idOldCatMenu = cssPK;
	},

	/**
	 * Actualizar el texto del filtro con la nueva seleccion
	 * TODO: Marcos - Modificado para marcar el seleccionado pero no actualizar el label
	 */
	_updateLabelFilter: function(obj) {
		var idCurrentList = $(obj).ancestors()[1],

		idLabel = $(idCurrentList).identify() + "_label",
		label = $(obj).descendants()[0],
		s_label = $(label).innerHTML;

		$(idLabel).update(s_label);

		return $(idCurrentList).identify();
	},
	
	/**
	 * Actualiza la presentacion visual del elemento seleccionado
	 * @param {Object} idList
	 * @param {Object} s_selection
	 */
	_updateListFilter: function (idList, s_selection) {
		var css = 'active',
		li = '';
		// por cada uno de los li comprobamos si es el seleccionado para marcarlo o desmarcarlo
		$$('#'+idList+' li a').each(function(item) {
			var id = $(item).identify();

			if(id == s_selection) {
				li = $(item).ancestors()[0];
				$(li).addClassName(css);
			}
			else {
				li = $(item).ancestors()[0];
				if($(li).hasClassName(css)) {
					$(li).removeClassName(css);
				}
			}
		});
	}

});

/**
 * PrivaliaMicrositesFilters - Common
 * =========================================
 * @modified: 	Marcos		(4-4-11)
 */
var PrivaliaMicrositesFilters = Class.create(PrivaliaMicrositesJsonFilters, {
	initialize: function($super) {
		$super();
		//version
        this.version =					1.0;
        this.setVersion(this.version, 'PrivaliaMicrositesFilters');
	},

	/**
	 * Desplegamos el menu de filtrado correspondiente
	 * siempre que no este desactivado (disableButton)
	 */
	showSelect: function(id) {
		var parent = $(id).ancestors()[0];
		if (!$(parent).hasClassName('disable')){
			if(this.filterTimeout !== null) {
				window.clearTimeout(this.filterTimeout);
			}

			if($(id) !== null){
				// si existe una div almacendada(cuando se ha abierto el menu) y coincide con la que le pasamos
				if (this.idSelectedMenu == id){
					this.closeFilter(this.idSelectedMenu);
				}
				else {
					if (this.idSelectedMenu != ''){
						this.closeFilter(this.idSelectedMenu);
					}
					this.showFilter(id);
				}
			}
		}
	}
});/**
 *  privalia.microsites.fittingroom.js
 * =========================================
 * @revision: 	1.1
 * @modified: 	Marcos (28-06-11)
 */

var PrivaliaMicrositesJsonFittingroom = Class.create(PrivaliaMicrositesBase, {
	initialize: function($super) {
		$super();

		this.b_buyPermission =			true;					// puede comprar el producto
		this.sameSizeSelectedFlag =		false;
		this.uniqueSizeFlag =			false;
		this.btnAdd =					'button-container';
		this.btnTooltipAdd =			'tooltip-button-container';
		this.btnMoreinfo =				'btnMoreinfo';
		this.campaign_PK = 				'';
		this.fitroom_step =				1;
		this.idForm =					'productForm';			// formulario de disponibilidad talla/comprar
		this.idNotAvailable =			'notavailable';
		this.idSelectQuantity =			'quantity';
		this.idTooltipSelectQuantity =	'tooltip-quantity';
		this.idSelectSize =				'select-size';
		this.idTooltipSelectSize =		'tooltip-select-size';
		this.divQuantity =				'quantity_container';
		this.divTooltipQuantity =		'tooltip-quantity-container';
		this.sizeFilterAvailable = 		0;
		this.s_product =				'';						// almacena la cantidad de items de un producto
		this.b_Installments =			false;					// flag boolean para saber si hay parcelados en la campanya
		this.relatedTooltipOpened = 	false;
		this.campaignPk = 				''; 

		this.s_sizeFromList =			'';
		 //version
	   	this.version =				1.7;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaMicrositesJsonFittingroom');

	},

	/**
	 * Microsites - Construye la pagina con los datos pasados por json previamente
	 */
	buildPage: function(generate) {
		var oResData = {};
		switch(generate) {

			// Detalle de Producto
			case 'product':
				oResData = this.getResData();
				// datos relacionados con el Breadcrumb
				if(!this.reloading) {
					this.getDataBreadcrumb(oResData);
					this.buildBreadcrumb();
				}

				// volcado de datos
				this.generateHtml({
					pushData: this.pushShopWindow
				});
				// Creamos objetos correspondientes a la barra lateral de sliders
				if(!this.reloading) {
					if(Country.getService() && (this.checkIfService()!= 0)){
						// Cargamos Family Products Slider
						setFittingRoomServiceASide();
					}else{
						// Cargamos Related Products Slider
					setFittingRoomASide();
					}
				}
				// Declaramos los sliders
				try{
					Event.observe(window,'load',function() {
						// crear y guardar una referencia a los carouseles
						Carousel.family = new Carousel($('slider-product'), $$('#you-will-like .slide-product'), $('you-will-like').select('a.carousel-control'), family_products_carousel);
						Carousel.related = new Carousel($('slider-product-related'), $$('#will-fit .slide-product2'),  $('will-fit').select('a.carousel-control2'), related_products_carousel);
					});
				}
				catch(e) {
					console.log(carousel_opciones, e);
				}
				// Ubicacion de datos deslocalizados en sus lugares correspondientes
				this.transferProductData();
				// Ubicamos la imagen principal
				this.transferMainPictures();
				// Aplicamos Cufon a los titulos
				Cufon.replace('h2');
				Cufon.replace('.cufon');

				// Asinga valores de producto y campaign en inputs ocultos del formulario recomendar producto
				this.setRecommendData();


				// si existen parcelados en detalle de producto
				if(this.b_Installments){
					this.showInstallments();
				}

				// Si no tiene items, ocultar el form para iniciar compra
				if(this.checkIfCanBuy()) {

					// Generamos el select con la disponibilidad de tallas
					if($('select-size')!==null){
						this.feedSelectSize(oResData.product_sizes, '', 'select-size');
					}

					// si la talla es UNICO, no mostrar talla y mostrar cantidad = 1 directamente
					if(this.checkIfUniqueSize()) {
						this.uniqueSizeFlag = true;
						this.setUniqueSizeMode();
					}else{
						// para forzar que el selecionar talla tenga por defecto la opcion "seleccionar talla"
						if ($(this.idSelectSize) !== null) {
							$(this.idSelectSize).value = '';
						}
					}

					// Para la venta de servicios hay productos que tienen una limitacion de compra, si el segundo parametro
					// es diferente a 0 es que tiene dicha limitacion
					// Venta de servicios
					if(!this.reloading && oResData.campaign_data.campaign_product_types.service == 1){
						// Ocultamos los divs para venta de servicios
						this.hideDivServices();

						// Para la venta de servicios hay productos que tienen una limitacion de compra, si el parametro
						// es diferente a 0 es que tiene dicha limitacion, mostramos el tooltip
						if(oResData.campaign_data.campaign_max_products !== 0){
						// Creamos el tooltip que indica un limite de productos
						var txt = this.getMsgCode(this.getResTextcodes());
						new PrivaliaTooltip('quantity', txt, {
							showNow: true
						});
					}
				}
				}

				//Venta de Servicios
				if (Country.getService()){
					var Service = new PrivaliaSellingServices(oResData, 'fittingroom');
				}

				//Zoom interno para evitar problemas con el volcado
				var Zoom = new PrivaliaZoom();
				Zoom.setCssJson('jsonZoom');
				//Obtenemos datos del zoom del producto
				var urlGetZoomData = Zoom.getUrlGetData('zoom');
				Zoom.getData(urlGetZoomData);


				// gestionar bloque de mas info: si no hay mas info, no mostrar el bloque
				this.setMoreInfo();
				//Vemos si existe una talla premarcada
				if(this.checkIfPredefinedSize()){
					this.setPredefinedSize();
				}
				// Campanyas para Adultos
				// Compruebo si el usuario ya ha aceptado las condiciones
				if (oResData.campaign_data.adult_campaign_accepted === 0){
					//TODO: Marcos - Pasar la modal como referencia
					if(typeof(modalAcceptAdultConditions) !== undefined){
						modalAcceptAdultConditions.open();
					}
				}

				this.buildNextAndPreviousProductLinks();
				
				// Modulo Social
				var Social = new PrivaliaSocial(this, 'fittingroom', this.getIsAdultCampaign(oResData));
				break;

			// productos relacionados
			case 'relatedcarousel':
				oResData = this.getResData();
				//Comprobamos que existen productos relacionados
				if (oResData.has_related_products_flag.flag){
					//Si existen, volcamos los datos
					this.generateHtml({
						pushData: this.pushRelatedCarousel
					});
					this.fitRelatedElements();
					this.getRelatedProductTooltip();
					if($('will-fit') !== null){
						$('will-fit').removeClassName("hidden");
					}
				}else{
					//Si no hay relacionados, mostramos los productos de la misma familia
					var Data4 = new PrivaliaMicrositesFittingroom(),
					urlGetDataFamily = Data4.getUrlGetData('family-products');
					Data4.setCssJson('json4');
				 	Data4.getData(urlGetDataFamily,'familycarousel');
				}
            	break;

			// productos de la familia
			case 'familycarousel':
				this.generateHtml({
					pushData: this.pushFamilyCarousel
				});
				this.fitFamilyElements();
				this.getFamilyProductTooltip();
            	break;

            // productos same size
			case 'samesizecarousel':
				oResData = this.getResData();
				//Comprobamos que existen productos con la misma talla
				//Si no, ocultamos el div correspondiente
				if (!oResData.has_same_products_flag.flag){
					if($('also-in-size') !== null){
						$('also-in-size').addClassName("hidden");
					}
				}else{
					this.generateHtml({
						pushData: this.pushSameSizeCarousel
					});
					this.getSameSizeProductTooltip();
					if($('also-in-size')!== null){
						$('also-in-size').removeClassName('hidden');
					}
					//	Declaramos el Carousel de tallas y guardamos una referencia a él
					Carousel.same = new Carousel($('slider-product-samesize'), $$('#also-in-size .slide-product3'), $('also-in-size').select('a.carousel-control3'), same_size_carousel);
				}
				break;

			default:
				this.generateHtml();
				break;
		}
	},
	
	/**
	 * Genera los links a siguiente y anterior producto, si hay un filtrado guardado
	 */
	buildNextAndPreviousProductLinks: function() {
		// generar link a siguiente y anterior producto usando el resultado de búsqueda guardado
		var products = window.localStorage ? localStorage['filter_result'] : Cookies.get('filter_result');
		try {
			products = products.evalJSON();
			if (!products || products.length < 1) {
				throw "filter_result is not an array"; // no hay filter result guardado
			}
			var product = this.getUrlParamValue('product');
			// obtener la posición del producto en el filter result
			var pos = 0;
			for (var i=0; i < products.length; i++) {
				if (products[i][0] == product) {
					pos = i;
					break;
				}
			}
			// verificar que el producto existe en el filter result
			if (products[pos][0] != product) {
				throw "product not stored in filter_result"; // el filter result no correponde a este producto
			}

			var campaign = this.getUrlParamValue('campaign');
			var size = this.getUrlParamValue('size', this.getUrl());
			var order = this.getUrlParamValue('order');
			var extra = "";
			if (size) {
				extra += "/size/" + size;
			}
			if (order) {
				extra += "/order/" + order;
			}

			if (pos > 0 && pos < products.length) {
				$('previous-product-link').href = '/microsites/fittingroom/campaign/' + campaign + '/category/' + products[pos-1][1] + '/product/' + products[pos-1][0] + extra;
				$('previous-product-link').removeClassName('disabled');
			}
			if (pos < products.length - 1) {
				$('next-product-link').href = '/microsites/fittingroom/campaign/' + campaign + '/category/' + products[pos+1][1] + '/product/' + products[pos+1][0] + extra;
				$('next-product-link').removeClassName('disabled');
			}
		} catch (e) {
		}
	},
		
		/**
	 * Detalle de Producto - Si no hay items, mostramos mensaje
	 * si lo hemos terminado nosotros mismos, no mostramos el mensaje
	 */
	checkIfCanBuy: function () {

		// comprueba la cantidad de items que tiene el producto
		var availability = this.getResData().product_data.quantity;
		// en el caso de que haya
		if(availability !== 0) {
			// volvemos a recoger la cantidad de items del producto
			this.s_product = this.getResData().product_data.quantity;
		}
		// si el producto esta agotado y la variable almacenada tambien es 0 o vacio entonces se deshabilita la compra
		// ojo que esto ha de ejecutarse siempre antes que el this.getAvailability() de mas abajo
		else if(availability === 0 && ( this.s_product === '' || this.s_product === 0 )) {
				// Ponemos en rojo el no disponible
				$$(".product-available").each(function (item){
					item.removeClassName("product-available");
					item.addClassName("product-unavailable");
				});
				// no se permite comprar
		        this.b_buyPermission = false;
		        // oculta formulario de tallas y cantidad
		        $(this.idForm).hide();
		        // ensenya el banner de agotado
		        $(this.idNotAvailable).show();
				//Oculta el resto de div
		        this.hideDivForm();
			}
			// si el producto esta agotado y la variable almacenada es diferente a 0 permite seguir con la compra
	        // este caso se reproduce cuando el usuario entra a ver un producto y agota las últimas existencias en el momento de compra
	        else if(availability === 0 && this.s_product !== 0){
	        	// Ponemos en rojo el no disponible
	    		$$(".product-available").each(function (item){
	    			item.removeClassName("product-available");
	    			item.addClassName("product-unavailable");
	    		});
	            // se permite comprar
	            this.b_buyPermission = true;
	            // oculta el form de cantidad
	            $(this.divQuantity).hide();

	            // Si el boton de comprar esta en falso lo activamos
	            // TODO: Posible mejora: mirar si es necesario.
	            // if( this.btnAddToCartIsEnabled() == false ){this.showAddButton();}
	        }
		return this.b_buyPermission;
	},
	/**
	 * Comprueba la existencia de un
	 */
	checkIfPredefinedSize: function(){
		var url = this.getUrl(),	
		s_size = this.getUrlParamValue('size',url);
		if (s_size !== ''){
			this.s_sizeFromList = decodeURIComponent(decodeURIComponent(s_size));
			return true;
		}else{
			return false;
		}
	},

	/**
	 * Detalle de Producto - Comprueba si se trata de una campanya de servicios
	 */
	checkIfService: function () {
		var isService = this.getResData().campaign_data.campaign_product_types.service;
		return isService;
	},
	/**
	 * Detalle de Producto - Comprueba el flag que nos dice si la talla es unica o no
	 */
	checkIfUniqueSize: function () {
		var unique = false,
		size_unique = this.getResData().product_sizes[0].size_unique;
		if(size_unique) {
			unique = true;
		}
		return unique;
	},

	/**
	 * Detalle de Producto - deshabilitar boton anadir a carrito
	 */
	disableTooltipAddButton: function() {
		if ($(this.btnTooltipAdd) !== null) {
			if (!$(this.btnTooltipAdd).hasClassName('disableButton')) {
				$(this.btnTooltipAdd).addClassName('disableButton');
			}
		}
	},

	/**
	 * Detalle de Producto - Constructor de URLs
	 * para getDatas a partir de la URL del navegador
	 */
	getUrlGetData: function (page) {
		var url = this.getUrl().toLowerCase(),
		urlGetData = '',
		urlProduct = '';

		switch(page) {
			// detalle de producto
			case 'fittingroom':
				urlProduct = url.split("fittingroom/")[1];
				this.urlSection = url.split("fittingroom/")[0];	// Parte de la url correspondiente a la seccion ej. http://it.privalia.loc/micrsoites/
				urlGetData = "/microsites/getProductData/" + urlProduct;
				break;

			// detalle de producto - productos de la misma familia
			case 'family-products':
				urlProduct = url.split("fittingroom/")[1];
				var urlCategory = urlProduct.split("/product")[0];
				this.urlSection = url.split("fittingroom/")[0];	// Parte de la url correspondiente a la seccion ej. http://it.privalia.loc/micrsoites/
				urlGetData = "/microsites/getFamilyProducts/" + urlCategory;
				break;

			// home de trailer
			case 'hometrailer':
				urlProduct = url.split("campaign/")[1]; // Obtengo el Campaign PK de la url
				urlGetData = "/microsites/getTrailerData/campaign/" + urlProduct;
				break;

			// detalle de producto
			case 'menu':
				var v_url = url.split("fittingroom/");
				if(v_url.size() > 1) {
					urlProduct = url.split("fittingroom/")[1];
				}
				else {
					v_url = url.split("shopwindow/");
					if(v_url.size() > 1) {
						urlProduct = url.split("shopwindow/")[1];
					}
					else {
						urlProduct = url.split("home/")[1];
					}
				}
				if(urlProduct != '') {
					urlGetData = "/microsites/getCategoryTree/" + urlProduct;
				}
				break;

			// detalle de producto - productos relacionados
			case 'related-products':
				urlProduct = url.split("fittingroom/")[1];
				this.urlSection = url.split("fittingroom/")[0];	// Parte de la url correspondiente a la seccion ej. http://it.privalia.loc/micrsoites/
				urlGetData = "/microsites/getRelatedProducts/" + urlProduct;
				break;

			// detalle de producto - same size
			case 'same-size':
				urlProduct = url.split("fittingroom/")[1];
				this.urlSection = url.split("fittingroom/")[0];	// Parte de la url correspondiente a la seccion ej. http://it.privalia.loc/micrsoites/
				var stockp = $F(this.idSelectSize);
				var campaign = urlProduct.split("/category")[0].split("campaign/")[1];
				urlGetData = "/microsites/getSameSizeProducts/campaign/" + campaign + "/stockp/" + stockp;
				break;

			// zoom producto
			case 'zoom':
				urlProduct = url.split("fittingroom/")[1];
				urlGetData = "/microsites/getPopZoomData/" + urlProduct;
				break;
		}

		return urlGetData;
	},

	/**
	 * Detalle de Producto - Mueve los datos volcados hacia los divs containers,
	 * que estan colocados en las ubicaciones finales
	 */
	transferMainPictures: function () {
		if($('product_images_container')) {
			$('product_images_container').update($('product_images').innerHTML);
			$('product_images').update('');
		}
		// Arreglamos un problemilla con el ie7
		if($('ab1')!== null){
			this.swapImage('ab1');
		}
	},

	/**
	 * Detalle de Producto - Mueve los datos volcados hacia los divs de productos de la familia
	 */
	fitFamilyElements: function () {
		if ($('product_family_container') !== null && $('products_family_list') !== null && $('you-will-like') !== null) {
			$('product_family_container').update($('products_family_list').innerHTML);
			// despues de mover los divs, borramos su contenido para evitar id's duplicados en el html
			$('products_family_list').update('');
			$('you-will-like').removeClassName('hidden');
		}
	},

	/**
	 * Detalle de Producto - Mueve los datos volcados hacia los divs de productos relacionados
	 */
	fitRelatedElements: function () {
		if ($('related_images_container') !== null && $('products_related_list') !== null) {
			$('related_images_container').update($('products_related_list').innerHTML);
			// despues de mover los divs, borramos su contenido para evitar id's duplicados en el html
			$('products_related_list').update('');
		}
	},

	/**
     * Detalle de Producto - Abre el modal del tooltip
     */
    getRelatedTooltip: function(url, modal){
		//PSEUDO: Comprobar que podemos abrir el tooltip
        if (!this.relatedTooltipOpened) {
			//volcamos datos del tooltip
            //RelatedData.getData(url, 'related-tooltip');
            this.relatedTooltipOpened = true;
        }
        modal.open();
    },

	/**
	 * Detalle de Producto - Oculta los div del form
	 * */
	hideDivForm: function() {
		if ($('estimated-date') !== null) {
			$('estimated-date').addClassName("hidden");
		}
		if ($('separator-box') !== null) {
			$('separator-box').addClassName("hidden");
		}
	},

	/**
	 * Detalle de Producto - Ocultamos los divs que no son necesarios para venta de servicios
	 */
	hideDivServices: function () {
		this.hideDivForm();
		//Ocultamos los sliders correspondientes
		if($('also-in-size')!== null){
			$('also-in-size').addClassName("hidden");
		}
		if ($('will-fit') !== null) {
			$('will-fit').addClassName("hidden");
		}
	},

	/**
	 * Detalle de Producto - deshabilitar el select de la cantidad
	 */
	hideTooltipQuantity: function () {
		if($(this.divTooltipQuantity)!==null){
			if(!$(this.divTooltipQuantity).hasClassName('disableButton')) {
				$(this.divTooltipQuantity).addClassName('disableButton');
				$(this.idTooltipSelectQuantity).disabled = true;
			}
		}
		this.fitroom_step = 1;
	},

	/**
	 * Detalle de Producto - Volcado personalizado
	 * para el carrusel de productos de la misma familia
	 */
	pushFamilyCarousel: function (dataJson, index) {
		var target = this.getTarget();

		if (target == "products_family_list"){
			dataJson.familySlideIndex = index;
		}

		// sumo datos a volcar
		this.addBuilt(dataJson);
	},

	/**
	 * Detalle de Producto - Volcado personalizado
	 * para el carrusel de productos relacionados
	 */
	pushRelatedCarousel: function (dataJson, index) {
		var target = this.getTarget();

		if (target == "products_related_list"){
			dataJson.relatedSlideIndex = index;
		}

		// sumo datos a volcar
		this.addBuilt(dataJson);
	},

	/**
	 * Detalle de Producto - Volcado personalizado
	 * para el carrusel de productos de la misma talla
	 */
	pushSameSizeCarousel: function (dataJson, index) {
		var target = this.getTarget();

		if (target == "products_size_list"){
			dataJson.sameSlideIndex = index;
		}

		// sumo datos a volcar
		this.addBuilt(dataJson);
	},

	/**
	 * Detalle de Producto - Volcado del contenido de los tooltip de productos relacionados
	 * @param {Object} dataJson
	 * @param {Object} index
	 */
	pushRelatedTooltip: function (dataJson, index) {
		var target = this.getTarget();

		if (target == "product_tooltip_data"){
 			//var s_url = "/microsites/fittingroom/campaign/" + dataJson.campaign_PK + "/category/" + dataJson.wcategory_PK + "/product/" + dataJson.product_PK ;
 			var s_url = "/microsites/fittingroom/campaign/16454/category/267325/product/1984145";
			dataJson.product_tooltip_url = s_url;
		}

		// sumo datos a volcar
		this.addBuilt(dataJson);
	},

	/**
	 * Detalle de Producto - Volcado de datos
	 */
	pushShopWindow: function (dataJson, index) {
		var target = this.getTarget();

		if(target == "product_data") {
			this.campaignPK = dataJson.campaign_PK;

			// Parcelados
			if(dataJson.product_available_installments  && dataJson.product_available_installments !== '0'){
				// flag para saber que hay parcelados
				this.b_Installments = true;
				// volcamos el multiplicador y el importe en una variable json
				dataJson.result_installments = dataJson.product_available_installments + "x " + dataJson.product_price_with_installments;
			}
			// No aplicar el texto disponibilidad a product_sizes pq lo haremos despues para el combobox (feedSelectSizes)
			// asignamos un nombre a la variable que contiene la disponibilidad
			if(!Object.isUndefined(dataJson.quantity)) {
				// la disponibilidad, si quedan 5 o menos, muestra "Quedan X", si queda 0, mostrara "agotado"
				dataJson.availability = this.getAvailability(dataJson.quantity);
			}
		}

		if(target == "campaign_data") {
			this.campaignPK = dataJson.campaign_PK;
		}

		//  Controlamos si nos pasan el thumbnail 3, 4 y 5. Si no los ocultamos
		if(target == "product_images") {
			if(!dataJson.ab3) {				
				dataJson.hide3 = 'hidden';
			}
			if(!dataJson.ab4) {
				dataJson.hide4 = 'hidden';
			}
			if(!dataJson.ab5) {
				dataJson.hide5 = 'hidden';
			}
		}

		// sumo datos a volcar
		this.addBuilt(dataJson);
	},

	/**
	 * Detalle de Producto - Resetea el stock_PK
	 */
	resetTooltipSize: function () {
		if ($('tooltip-product') !== null) {
			$('tooltip-product').value = '';
		}
	},

	/**
	 * Detalle de Producto - Gestionar bloque de mas info: si no hay mas info, no mostrar el bloque
	 */
	setMoreInfo: function () {
		var data = this.getResData().product_data.product_more_info;
		if(data == '') {
			$(this.btnMoreinfo).hide();
		}
	},
	/**
	 * Metodo que comprueba si la talla proveniente de listado de productos esta disponible en el detalle de producto
	 * Si es asi, la selecciona
	 * Si no es asi, selecciona el primer elemento del combo
	 */
	setPredefinedSize: function(){
		// Comprobamos que la talla esta presente en el select del producto
		if (this.s_sizeFromList !== ''){
			var i = 0,
			selectSizeLength = $(this.idSelectSize).options.length,
			found = false;
			while(i<selectSizeLength && !found){
				var option = $(this.idSelectSize).options[i],
				selectSize = this.trim(option.text.split("--")[0]);
				if(selectSize == this.s_sizeFromList){
					//Comprobamos que la talla no esta agotada
					if(!$(option).hasClassName("exhausted")){
						//Set-Up de la talla en el select
						$(this.idSelectSize).selectedIndex = i;
						this.selectSize();
						found = true;
					}else{
						//Talla agotada
						$(this.idSelectSize).selectedIndex = 0;
					}
				}
				i += 1;
			}
		}
	},

	/**
	 * Detalle de Producto - Marcar producto actual del slide
	 * Cuando esta selected elimina la clase inactive
	 */
	setProductSelected: function () {
		var productPK = this.getProductPK();
		try {
			var idSlide = 'slide_img_' + productPK;
			if($(idSlide)!== null){
				$(idSlide).removeClassName('inactive');
			}
		}
		catch(e) {
			if(this.debug) {
				console.log('PrivaliaJson.setProductSelected', e);
			}
		}
	},

	/**
	 * Detalle de Producto - Asigna valores del producto y campaign
	 * a dos inputs ocultos en el formulario de recomendar producto para ser enviados
	 * TODO: Marcos - Deprecated
	 */
	setRecommendData: function () {
		var productIdModal = this.getResData().product_data.product_PK,
		campaignIdModal = this.getResData().product_data.campaign_PK;
		if ($('recommend_product') !== null) {
			$('recommend_product').writeAttribute("value", productIdModal);
		}
		if ($('recommend_campaign') !== null) {
			$('recommend_campaign').writeAttribute("value", campaignIdModal);
		}
	},

	/**
	 * Detalle de Producto - Setea el stock_PK
	 */
	setSize: function () {
		var newSize = $F(this.idSelectSize);
		if ($('product') !== null) {
			$('product').value = newSize; // aunque se llame product el campo, en realidad es el stock_PK
		}
	},

	/**
	 * Detalle de Producto - Setea el stock_PK
	 */
	setTooltipSize: function () {
		var newTooltipSize = $F(this.idTooltipSelectSize);
		if ($('tooltip-product') !== null) {
			$('tooltip-product').value = newTooltipSize; // aunque se llame product el campo, en realidad es el stock_PK
		}
	},

	/**
	 * Detalle de Producto - Setea el select de tallas del tooltip con el valor del selector de tallas principal
	 * solo si este hubiera sido seleccionado
	 */
	setTooltipSizeSelect: function () {

		if ($(this.idSelectSize)!== null && $(this.idTooltipSelectSize)!== null){
			// Chequeamos el valor del select de tallas principal
			var currentMainSize = $F(this.idSelectSize);
			if (currentMainSize !== '') {

				//Extraemos el texto del option seleccionado actualmente y borramos la informacion de disponiblidad y los espacios
				var mainSize = $(this.idSelectSize).options[$(this.idSelectSize).selectedIndex].text;
				mainSize = this.trim(mainSize.split("--")[0]);

				//Iteramos hasta encontrar la talla seleccionada en el select de tallas del tooltip
				var tooltipSelectSizeLength =  $(this.idTooltipSelectSize).options.length,
				i = 0,
				found = false;
				while(i<tooltipSelectSizeLength && !found){
					var option = $(this.idTooltipSelectSize).options[i],
					toolSize = this.trim(option.text.split("--")[0]);
					if(toolSize == mainSize){
						//Comprobamos que la talla no esta agotada
						if(!$(option).hasClassName("exhausted")){
							$(this.idTooltipSelectSize).selectedIndex = i;
							if (typeof(RelatedData) != 'undefined') {
								RelatedData.selectTooltipSize();
								found = true;
							}else{
								if (typeof(DGuardian) != 'undefined'){
									DGuardian.log(e, 'PrivaliaMicrositesJsonFittingroom.setTooltipSizeSelect: RelatedData not Defined');
								}
							}
						}else{
							$(this.idTooltipSelectSize).selectedIndex = 0;
						}
					}
					 i++;
				}
			}else{
				$(this.idTooltipSelectSize).selectedIndex = 0;
			}

		}
	},

	/**
	 * Detalle de Producto - Prepara el modo de talla unica
	 * Oculta la talla y muestra por defecto cantidad 1
	 */
	setUniqueSizeMode: function () {
		this.uniqueSizeFlag = true;

		// seleccionamos valor UNICO
		$(this.idSelectSize).selectedIndex = 1;

		// simular el evento de que he seleccionado la talla
		this.selectSize();

		// ocultar select
		$$('.select-size').each(function(item){
			item.addClassName('hidden');
		});

		// mostrar y activar select de cantidad
		$(this.divQuantity).addClassName("padtop15");

		// Activar boton add to cart
		this.showAddButton();
	},

	/**
	 * Detalle de Producto - Habilita el boton de anadir a carrito.
	 * Si detecta que la seleccion de cantidad es vacia, deshabilitar el boton
	 */
	showAddButton: function() {
		if($(this.btnAdd)!== null){
			if($(this.btnAdd).hasClassName('disableButton')) {
				$(this.btnAdd).removeClassName('disableButton');
				this.fitroom_step = 3;
			}
			else if($F(this.idSelectQuantity) == "") {
				this.disableAddButton();
			}
		}
	},

	/**
	 * Detalle de Producto - Habilita el boton de anadir a carrito.
	 * Si detecta que la seleccion de cantidad es vacia, deshabilitar el boton
	 */
	showTooltipAddButton: function() {
		if(!$(this.divTooltipQuantity).hasClassName('disableButton')){
			if($(this.btnTooltipAdd)!== null){
				if($(this.btnTooltipAdd).hasClassName('disableButton')) {
					$(this.btnTooltipAdd).removeClassName('disableButton');
					this.fitroom_step = 3;
				}
				else if($F(this.idTooltipSelectQuantity) == "") {
					this.disableTooltipAddButton();
				}
			}
		}
	},

	/**
	 * Detalle de Producto - Muestra el combo de la cantidad.
	 * Tambien hay que controlar el max de cantidad dependiendo de la disponibilidad de la talla
	 */
	showQuantity: function () {
		if($(this.divQuantity)!== null){
			if($(this.divQuantity).hasClassName('disableButton')) {
				$(this.divQuantity).removeClassName('disableButton');
				$(this.idSelectQuantity).disabled = false;
				this.showAddButton();
				this.fitroom_step = 2;
			}
		}
	},

	/**
	 * Detalle de Producto - Mostramos el carousel de los productos disponibles en la misma talla en caso de existir
	 */
	showSameSize: function (){
		if (typeof(Data3) != 'undefined') {
			// Si no es la primera vez qeu lo cargamos, actualizamos la url y recargamos
			if(this.sameSizeSelectedFlag){
				if($('products_size_list')!== null){
					$('products_size_list').update('');
				}
				Data3.url_getData = this.getUrlGetData('same-size');
				Data3.reload();
			}else{
				var urlGetDataSameSize = Data3.getUrlGetData('same-size');
				Data3.getData(urlGetDataSameSize,'samesizecarousel');
				this.sameSizeSelectedFlag = true;
			}
		}
	},

	/**
	 * Detalle de Producto - Muestra el combo de la cantidad.
	 * Tambien hay que controlar el max de cantidad dependiendo de la disponibilidad de la talla
	 */
	showTooltipQuantity: function () {
		if($(this.divTooltipQuantity)!== null){
			if($(this.divTooltipQuantity).hasClassName('disableButton')) {
				$(this.divTooltipQuantity).removeClassName('disableButton');
				$(this.idTooltipSelectQuantity).disabled = false;
				this.showTooltipAddButton();
				this.fitroom_step = 2;
			}
		}
	},

	/**
	 * Detalle de Producto - Mover la data volcada en los divs containers
	 */
	transferProductData: function () {
		// mostramos la descripcion del producto en la cabecera
		if ($('product-desc') !== null) {
			$('product-desc').update(this.brCleaner($('product-name-container').innerHTML));
		}
		// mostramos el nombre de la marca en la cabecera
		if ($('campaign-name') !== null) {
			$('campaign-name').update($('campaign-name-container').innerHTML);
		}
		// mostramos el nombre de la marca en la cabecera
		if ($('campaign-name-back') !== null) {
			$('campaign-name-back').update($('campaign-name-container').innerHTML);
		}
		// mostramos la descripcion del producto
		if ($('tab-description') !== null) {
			$('tab-description').update($('tab-description-container').innerHTML);
		}
		// mostramos mas info del producto
		if ($('tab-moreinfo') !== null) {
			$('tab-moreinfo').update($('tab-moreinfo-container').innerHTML);
		}
		// seteamos el link para volver al listado de productos
		var url_backToList = URL_DOMAIN + "/microsites/shopwindow/campaign/" + this.getCampaignPK() + "/#category/" + this.getCategoryPK();
		var order = this.getUrlParamValue('order');
		if (order) {
			url_backToList += "/order/" + order;
		}
		var size = this.getUrlParamValue('size', this.getUrl());
		if (size) {
			url_backToList += "/size/" + size;
		}
		var view = this.getUrlParamValue('view', this.getUrl());
		if (view) {
			url_backToList += "/view/" + view;
		}
		if($('back-to-list')!==null){
			$('back-to-list').writeAttribute("href", url_backToList );
		}
		//Despues de transferir los datos mostramos las pestanyas de informacion
		$('tabs').removeClassName('hidden');
		$('sub-header').removeClassName('hidden');
	}

});

var PrivaliaMicrositesFittingroom = Class.create(PrivaliaMicrositesJsonFittingroom, {
	initialize: function($super) {
		$super();

		this.fitroom_image =		'';
		this.txt_selectSize =		'';

		this.idlimitProductTarget =   		'quantity';
		this.idRelationedBox =				'relatedBody';
		this.idRelationedLateralShadow =	'#familyTooltip .lateralshadow';

		 //version
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaMicrositesFittingroom');
	},

	/**
	 * Detalle de Producto - Muestra Tooltip Familia de Producto
	 */
	getFamilyProductTooltip: function(){
		var v_familySlides = $$(".slide-product a");
		//Identificamos el producto y pasamos su posicion
        v_familySlides.each(function(item){
            item.observe('click', (function(){
				if (typeof(DGuardian) != 'undefined') {
					if(DGuardian.getFullyLoaded()){
						var slidePosition = parseInt(item.identify().split("family-slide-")[1]);
						this.getProductTooltip(slidePosition, 'family');
						ProductTooltip.show(item.identify());
					}
				}
            }).bind(this));
        }, this);
	},

	/**
	 * Detalle de Producto - Muestra Tooltip Productos Relacionados
	 */
	getRelatedProductTooltip: function(){
		var v_relatedSlides = $$(".slide-product2 a");
		//Identificamos el producto y pasamos su posicion
        v_relatedSlides.each(function(item){
            item.observe('click', (function(){
				if (DGuardian.getFullyLoaded()) {
					var slidePosition = parseInt(item.identify().split("related-slide-")[1]);
					this.getProductTooltip(slidePosition, 'related');
					ProductTooltip.show(item.identify());
				}
            }).bind(this));
        }, this);
	},

	/**
	 * Detalle de Producto - Muestra Tooltip Productos de la misma Talla
	 */
	getSameSizeProductTooltip: function(){
		var v_sameSizeSlides = $$(".slide-product3 a");
		//Identificamos el producto y pasamos su posicion
        v_sameSizeSlides.each(function(item){
            item.observe('click', (function(){
				if (DGuardian.getFullyLoaded()) {
					var slidePosition = parseInt(item.identify().split("same-slide-")[1]);
					this.getProductTooltip(slidePosition, 'same');
					ProductTooltip.show(item.identify());
				}
            }).bind(this));
        }, this);
	},

	/**
	 * Detalle de Producto - Devuelve un objeto adaptado a cada uno de los carruseles
	 * @param {Object} position - posicion del thumbnail clickado
	 * @param {String} desc - description of the tooltip family ('related', 'family', 'same')
	 */
	getProductTooltip: function(position, desc){
		var data = {};
		if(this.getResData().products_family_list !== undefined ){
			data = this.getResData().products_family_list;
			this.transferTooltipInfo(data, position, desc);
		}else if(this.getResData().products_related_list !== undefined ){
			data = this.getResData().products_related_list;
			this.transferTooltipInfo(data, position, desc);
		}else if(this.getResData().products_size_list !== undefined ){
			data = this.getResData().products_size_list;
			this.transferTooltipInfo(data, position, desc);
		}
	},

	/**
	 * Detalle de Producto - Deshabilitar los botones, anyadir a carrito e iniciar compra
	 */
	hideButtons: function() {
		// deshabilitar boton de anadir al carrito
		this.disableAddButton();
		this.fitroom_step = 2;
	},

	/**
	 * Detalle de Producto - Deshabilitar los botones, anyadir a carrito e iniciar compra
	 */
	hideTooltipButtons: function() {
		// deshabilitar boton de anadir al carrito
		this.disableTooltipAddButton();
		this.fitroom_step = 2;
	},

	/**
	 * Detalle de Producto - Reseteado del tooltip de productos relacionados
	 */
	resetTooltip: function(){
		//Set up Size Selection Combo
		this.hideTooltipButtons();
		this.hideTooltipQuantity();
		if($('tooltip-select-size')!==null){
			$('tooltip-select-size').update('');
		}
		if($('tooltip-quantity')!== null){
			$('tooltip-quantity').selectedIndex = 0;
		}
		//Limpiamos el valor del stock_PK
		this.resetTooltipSize();
	},

	/**
	 * Detalle de Producto - Seleccionar la talla muestra el siguiente paso que es la cantidad
	 */
	selectSize: function () {
		if($F(this.idSelectSize) != "") {
			// cerramos las posibles notificaciones que puedan existir
			this.closeNotify();
			// ver si la talla seleccionada esta agotada
			if(!this.selectSizeIsExhausted()) {
				// controlar max cantidad
				this.setSelectQuantity(this.idSelectSize, this.idSelectQuantity);
				this.showQuantity();
				this.setSize();
				// Mostramos el carrusel de productos con la misma talla
				if(!this.uniqueSizeFlag){
					this.showSameSize();
				}
			}else {
				this.hideButtons();
				this.hideQuantity();
			}
		}else {
			this.hideButtons();
			this.hideQuantity();
		}
	},

	/**
	 * Detalle de Producto - Seleccionar la talla habilita el siguiente paso que es la cantidad
	 */
	selectTooltipSize: function () {
		if($F(this.idTooltipSelectSize) != "") {
			// ver si la talla seleccionada esta agotada
			if(!this.selectTooltipSizeIsExhausted()) {

				// controlar max cantidad
				this.setSelectQuantity(this.idTooltipSelectSize, this.idTooltipSelectQuantity);
				this.showTooltipQuantity();
				this.setTooltipSize();
			}else {
				this.resetTooltipSize();
				this.hideTooltipButtons();
				this.hideTooltipQuantity();
			}
		}else {
			this.resetTooltipSize();
			this.hideTooltipButtons();
			this.hideTooltipQuantity();
		}
	},

	/**
	 * Detalle de Producto - Comprobar si la talla seleccionada esta agotada o no, para mostrar o no el siguiente paso
	 */
	selectSizeIsExhausted: function () {
		var exhausted = false,
		vOptions = $$('#' + this.idSelectSize + ' .exhausted'), // recuperamos todas las opciones que estan agotadas
		selected = $F(this.idSelectSize);

		vOptions.each(function(opt) {
			// si la opcion seleccionada es una que esta agotada, lo marcamos
			if(!exhausted && opt.value == selected) {
				exhausted = true;
			}
		});
		return exhausted;
	},

	/**
	 * Detalle de Producto - Tooltip - Comprobar si la talla seleccionada esta agotada o no, para mostrar o no el siguiente paso
	 */
	selectTooltipSizeIsExhausted: function () {
		var tooltipExhausted = false,
		vOptions = $$('#' + this.idTooltipSelectSize + ' .exhausted'), // recuperamos todas las opciones que estan agotadas
		selected = $F(this.idTooltipSelectSize);

		vOptions.each(function(opt) {
			// si la opcion seleccionada es una que esta agotada, lo marcamos
			if(!tooltipExhausted && opt.value == selected) {
				tooltipExhausted = true;
			}
		});
		return tooltipExhausted;
	},

	/**
	 * Detalle de Producto - Venta de Servicios - Definir el texto por defecto del combo Seleccionar talla
	 */
	setSelectSizeTxt: function (txt) {
		this.txt_selectSize = txt;
	},

	/**
	 * Detalle de Producto - Ajusta el tamanyo de las sombras del tooltip de productos relacionados
	 */
	setTooltipShadows: function (){
		if($(this.idRelationedBox)!== null){
			// obtenemos la altura del tamanyo del tooltip
			var i_boxHeight;
			//La primera vez que habrimos el tooltip ponemos altura fija. A mejorar
			if($(this.idRelationedBox).getHeight() == 0){
				i_boxHeight = 412;
			//Si ya le hoemos abierto alguna vez calculamos la altura
			}else{
				i_boxHeight = $(this.idRelationedBox).getHeight() - 4;
			}
			// fijamos los tamanyos de las sombras en funcion
			var shadows = $$(this.idRelationedLateralShadow),
			sLength = shadows.length;
			for (var i=0; i<sLength; i++){
				shadows[i].setStyle({height: i_boxHeight + 'px'});
			}
		}
	},



	/**
	 * Detalle de Producto - Submit personalizado
	 */
	submitRecommendForm: function(idForm) {
		var othis = this;
		this.submit(idForm, function(response) {
			othis.parseResponse(response);
			if(othis.statusOK()) {
				// oculta la div correspondiente al primer mensaje y muestra el segundo
				if($('modal1')!== null){
				$('modal1').hide();
				}
				if ($('modal2') !== null) {
				$('modal2').show();
			}
			}
			else {
				othis.endSubmitError();
			}
			othis.stopLoad();
			othis.stopTimeout();
		});
		return false;
	},

	/**
	 *  Detalle de Producto - Muestra imagen  correspondiente al thumbnail
	 */
	swapImage: function (image) {
		if(image != ''){
		if(this.fitroom_image != image) {
			$$('.bigImage').each(function(img) {
				$(img).hide();
			});
			$(image).show();
			this.fitroom_image = image;
		}
		}
	},

	/**
	 * Detalle de Producto - Transfiere los datos de objetos al tooltip
	 * @param {Object} data - informacion del producto
	 * @param {Object} position - posicion del producto seleccionado dentro del carrusel especifico
	 * @param {String} desc - description of the tooltip family ('related', 'family', 'same')
	 */
	transferTooltipInfo: function(data, position, desc){
		//Reseteamos el tooltip
		this.resetTooltip();

		//Recuperamos la informacion desde el json
		var prodf_pvs = data[position].prodf_pvs,
		prodf_pvp = data[position].prodf_pvp,
		product_name = this.brCleaner(data[position].product_name),
		product_url = data[position].product_url,
		product_img = data[position].image_url_ab1,
		product_PK = data[position].product_pk,
		product_quantity = data[position].quantity;

		// analytics
		if (desc == 'family') {
			var carousel = 'FC';
		} else if (desc == 'same') {
			var carousel = 'SC';
		} else {
			var carousel = 'RC';
		}
		PRV.Tracker.registerEvent('viewProductTooltip', {
				type: carousel,
				pkProduct: product_PK,
				quantity: product_quantity
		});

		//Transferimos a sus respectivos puestos
		if($('tooltip-total')!== null){
			$('tooltip-total').update(prodf_pvs);
		}
		if($('tooltip-pvp')!== null){
			$('tooltip-pvp').update(prodf_pvp);
		}
		if($('tooltip-link')!== null){
			$('tooltip-link').update(product_name);
			$('tooltip-link').writeAttribute("href", product_url);
		}
		if ($('tooltip-picture') !== null) {
			$('tooltip-picture').writeAttribute("src", product_img);
		}
		if($('atc-from-related') !== null){
			$('atc-from-related').writeAttribute("onclick", this._getTooltipProductBtnCall(data[position], carousel));
		}
		
		// Modificamos flechas de anterior y siguiente para que carguen los productos correspondientes
		$('tooltip-prev').stopObserving('click');
		$('tooltip-next').stopObserving('click');
		$('tooltip-next').removeClassName('disabled');
		$('tooltip-prev').removeClassName('disabled');
		if (position == 0) {
			$('tooltip-prev').addClassName('disabled');
		}
		if (position == data.length - 1) {
			$('tooltip-next').addClassName('disabled');
		}
		if (position > 0) {
			$('tooltip-prev').observe('click', (function() {
				// generamos el tooltip
				this.getProductTooltip(position - 1, desc);
				// movemos el Carousel un lugar y cuando termina mostramos el tooltip
				Carousel[desc].options.afterMove = function() {
					ProductTooltip.show(desc + '-slide-' + (position - 1));
					delete Carousel[desc].options.afterMove;
				}
				Carousel[desc].prev();
			}).bind(this));
		}
		if (position < data.length - 1) {
			$('tooltip-next').observe('click', (function() {
				// generamos el tooltip
				this.getProductTooltip(position + 1, desc);
				// movemos el Carousel un lugar y cuando termina mostramos el tooltip
				Carousel[desc].options.afterMove = function() {
					ProductTooltip.show(desc + '-slide-' + (position + 1));
					delete Carousel[desc].options.afterMove;
				}
				Carousel[desc].next();
			}).bind(this));
		}
		//Cargamos el select de tallas
		//TODO: Eliminar las referencias directas a RelatedData y Data
		if(('tooltip-select-size'!== null)){
			if (typeof(RelatedData) !== 'undefined') {
				RelatedData.feedSelectSize(data[position].product_sizes, '', 'tooltip-select-size');
				$('tooltip-select-size').insert({
					top: '<option value="select" selected="selected">' + Data.txt_selectSize + '</option>'
				});
				this.setTooltipSizeSelect();
			}
		}
		if (typeof(RelatedData) !== 'undefined' ) {
			RelatedData.feedSelectQuantity(data[position].product_sizes, '', 'tooltip-quantity');
		}

		this.setTooltipShadows();
	},
	
	/**
	 * Devuelve el contenido del atributo onclick en funcion del producto y el carrusel 
	 * @param {Object} data
	 * @param {Object} sLocation
	 */
	_getTooltipProductBtnCall: function (data, sLocation){
		var sBtnCallback = "if (!RelatedData.btnAddToCartIsEnabled('relatedProductForm')) return false; selectProduct(modalReopen, modalOtherReopened, 'relatedProductForm');",
		nCampaignPK = this.getUrlParamValue('campaign'),
		nProductPK = data.product_pk,
		nProductQuantity = data.quantity,
		sTrackingCall = '';
		
		switch (sLocation){
			case 'RC':
				sTrackingCall = "PRV.Tracker.registerEvent('addToCartTooltipRC', {pkProduct:" + nProductPK + ",eVar8:'" + nProductQuantity + "',eVar9:'" + sLocation + "'});";
			break;
			case 'SC':
				sTrackingCall = "PRV.Tracker.registerEvent('addToCartTooltipSC', {pkProduct:" + nProductPK + ",eVar8:'" + nProductQuantity + "',eVar9:'" + sLocation + "'});";
			break;
			case 'FC':
				sTrackingCall = "PRV.Tracker.registerEvent('addToCartTooltipFC', {pkProduct:" + nProductPK + ",eVar8:'" + nProductQuantity + "',eVar9:'" + sLocation + "'});";
			break;
			default:
				sTrackingCall = "PRV.Tracker.registerEvent('addToCartTooltipRC', {pkProduct:" + nProductPK + ",eVar8:'" + nProductQuantity + "',eVar9:'" + sLocation + "'});";
		}
		
		
		return sBtnCallback + sTrackingCall;
	}

});/**
 *  privalia.microsites.index.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 90-privalia.base.js
 * @revision: 	1.0
 */

/**
 * PrivaliaMicrositesJsonIndex - Common
 * =========================================
 * @modified: 	Cristina	(09-06-11)
 */

var PrivaliaMicrositesJsonIndex = Class.create(PrivaliaMicrositesBase, {
	initialize: function($super) {
		$super();

		this.b_iphonePK = 				false;					// indica si la campanya es solo para iphone
		this.idStoreClosed =			'storeClosed';			// imagen de tienda cerrada

		this.vHumanDays =				[];

		this.sizeFilterAvailable = 		0;
		this.b_Installments =			false;					// flag boolean para saber si hay parcelados en la campanya
		this.currentTooltipElement =	'';

		this.i_campaignCounter	=		0;
		this.idNextCampaigns = 			'incoming-campaigns';
		this.idNextCampaignsTooltip = 	'campaignLogoTooltip';

		this.v_logoImgs	=				[''];
		this.i_campaignTimerCounter	=		0;

		this.idUserMsg = 				'userMsg';				//id que identifica el mensaje para usuario
		
		// promociones campanyas
		this.cssCampaignRow =			'js-campaign-row';
		this.cssCampaignRowHigh =		'js-campaign-row-high';
		this.cssCampaignPromo =			'js-campaign-promo';
		
		// ID diferentes campanyas activas
		this.today = 		"today";					//id que identifica la seccion de Hoy estrenamos
		this.currently = 	"currently";				//id que identifica la seccion de Actualmente
		this.lastday = 		"lastday";					//id que identifica la seccion de Ultimo dia
		this.fanshop = 		"fanshop";					//id que identifica la seccion de Fanshop
		this.installments = "js-installments";				//id que identifica la seccion de Parcelados. Solo BR
		
		// ID diferentes Zona Mobile y Social Media
		this.idOrderZonaMobile = "order_mobile_zone";			//id que controla donde se va a volcar el contenido segun el order
		this.idOrderSocialMedia = "order_social_media";			//id que controla donde se va a volcar el contenido segun el order
		this.idZonaMobile = "mobile_zone";			//id que controla si se muestra el bloque zona mobile
		this.idSocialMedia = "social_media";			//id que controla si se muestra el bloque social media
		this.idFacebook = "box-facebook";							//id facebook
		this.idShowFacebook = "js-show-facebook";		
		this.idSeparation = "js-separation";		//id separacion		
		this.classAsideLink = ".aside_link";					//identifica todos los enlaces que tiene la siguiente clase para mostrar o no el enlace
		
		//Modal promociones member action
		this.idMemberName = "js-member-name";		//id para volcar el nombre del socio
		this.idLinkMicrosite =	"js-linkmicrosite"; //id para volcar la url del escaparate
		
		this.url_microsite	= URL_DOMAIN + '/microsites/index';	// url escaparate
		this.o_modalPromotion = {}	//objeto donde almacenamos la modal
		
		this.v_ItemLine =	{'campaigns_today':'1','campaigns_active':'2', 'campaigns_lastday':'2', 'campaigns_fanshop':'1'};			// array para guardar items por linea
		
		this.vTypePromotion =	{'1':'js-special','2':'js-promotion', '3':'js-social'};			// array que controla el estilo de las barras de promociones
		
		//Campanyas adultos
		this.noLink =				'adultnolink';
	 	//version
	   	this.version =				4.1;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaMicrositesJsonIndex');
	},
	
	/**
	 * Pueden haber campanyas con promociones (el texto q sale encima de la campanya)
	 * este metodo ajusta las filas para alinear horizontalmente las campanyas
	 */
	adjustPromotionPadding: function () {
		$$('.' + this.cssCampaignRow).each(function(row) {
			var v_campaigns = row.childElements();
			v_campaigns.each(function(campaign) {
				if(campaign.hasClassName(this.cssCampaignPromo)) {
					row.addClassName(this.cssCampaignRowHigh);
				}
			}, this);
			
		}, this);
		
	},

	/**
	 *  Construye la pagina con los datos pasados por json previamente
	 */
	buildPage: function(generate) {
		switch(generate) {
			case 'campaigns_list':
				//Muestra solo la seccion donde hay campanyas
				var data = this.getResData();
				this.getCampaignActive(data);

				//Tienda cerrada
				if (this.checkIfStoreClosed(data)) {
					this.showStoreClosed();
				}
				else {
					this.generateHtml({
						pushData: this.pushCampaigns
					});				
					
					// alinear las campanyas que puedan o no tener el texto-promo
					this.adjustPromotionPadding();
					
					//quitar link campanya adultos franja horaria no legal
					this.hideLinkCampaignAdult();
					
					this.setCampaignTimers();
				}
				break;

			case 'high_light':
				
				var data = this.getResData();
				
				this.generateHtml({
					pushData: this.pushHighLight
				});

				//Muestra el mensaje al usuario
				this.setUserMsg(data);
				
				//Mostrar y volcado modal promociones
				this.transferModalPromotion(data);
				
				//debe de ser despues del volcado
				Cufon.replace('h1');
				
				break;	

			case 'next_campaigns':
				this.generateHtml({
					pushData: this.pushNextCampaigns
				});
				// En caso de no haber campanyas, ocultamos la seccion de proximamente
				if (this.getResData().next_campaigns.length !== 0){
					this.showIncomingCampaigns();
					this.getCampaignLogoTooltip();
				}
				break;
				
			case 'aside_info':
				//ZONA MOBILE Y SOCIAL MEDIA
				var data = this.getResData();
				if (data != null){
					//Seccion Parcelados
					if( Country.getIso()== 'br') {
						this.showInstallments();
					}
					
					//Mostrar las secciones segun el orden que nos pasan
					this.showOrderSection(data);

					//Ocultar seccion
					this.hideSections(data);
					
					
				}
				this.generateHtml({
					pushData: this.pushAsideInfo
				});
				//Una vez se ha volcado la informacion se oculta las etiquetas "a" donde no hay enlaces
				this.showLinks();
				
				break;
			default:
				this.generateHtml();
				break;
		}
	},
	
	/**
	 * cada X ha de hacer un salto de linea (clear), y quitar padding derecha
	 */
	breakLine: function(dataJson, index, itemsPerLine) {
		if((index+1) % itemsPerLine == 0) {
			// hacemos salto linea
			// poner clear
			dataJson.cerrardiv = '</div>';
			dataJson.clear = '<div class="clear"></div>';
			// quitar padright
		}
		else {
			// poner padright
			dataJson.anyadirdiv = '<div class="'+ this.cssCampaignRow +'">';
			dataJson.padding = 'marright10';
		}
		return dataJson;
	},
		
	/**
	 * Comprueba si las campanyas son para mostrarse solo en iPhone, en estos momentos no se esta utilizando
	 */
	checkCampaignPK: function (campaign_PK) {
		//campaign_PK que hay que omitir
		var notshownPK1 = '17320';	// ES
		var notshownPK2 = '13431';	// IT
		var notshownPK3 = '4561';	// MEX

		if(campaign_PK == notshownPK1 || campaign_PK == notshownPK2 || campaign_PK == notshownPK3){
			this.b_iphonePK = true;
		}
		else{
			this.b_iphonePK = false;
		}
		return this.b_iphonePK;
	},
	
	/**
	 * Comprueba que no hayan campanyas
	 */
	checkIfStoreClosed: function (data) {
		if ( !Object.isUndefined(data.campaigns_fanshop) && !Object.isUndefined(data.campaigns_today) && !Object.isUndefined(data.campaigns_active) && !Object.isUndefined(data.campaigns_lastday) ){
			return (this.getQuantityCampaign(data.campaigns_fanshop) == 0) && (this.getQuantityCampaign(data.campaigns_today) == 0) && (this.getQuantityCampaign(data.campaigns_active) == 0) && (this.getQuantityCampaign(data.campaigns_lastday) == 0);
		}
	},
	
	/**
	 * Comprueba que exista el bloque Zona Mobile
	 */
	checkIfBlockMobileZone: function (data) {
		return ( (data.mobile_zone.bottom.show == "hidden") && (data.mobile_zone.header.show == "hidden") && (data.mobile_zone.middle.show == "hidden") && (data.mobile_zone.top.show == "hidden") );
	},
	
	/**
	 * Comprueba que exista el bloque Zona Mobile
	 */
	checkIfBlockSocialMedia: function (data) {
		return ( (data.social_media.bottom_left.show == "hidden") && (data.social_media.bottom_right.show == "hidden") && (data.social_media.header.show == "hidden") && (data.social_media.top.show == "hidden") );
	},
	
	/**
	 * Cierra la modal
	 */
	closeModalPromotion: function (){
		this.modalPromotion.close();
		this.o_modalPromotion = null;
	},
	
	/**
	 * Ocultar la campanya adulto en franja horaria no correcta
	 */
	campaignAdult: function(dataJson) {
		dataJson.campaignadult = "";
		if (!dataJson.slot_active){
			//opacidad capa contenedora campanya adulto
			dataJson.campaignadult = "hideadult disable";
			//asignar clase al enlace de campanya adulta para deshabilitarlo
			dataJson.adultnolink = "adultnolink";			
		}
		return dataJson;
	},
	
	/**
	 * Si hay campanyas activas. Se muestra la seccion
	 */
	getCampaignActive: function (data) {
		//Si existe el objeto y campanyas activas
		if ( !Object.isUndefined(data.campaigns_fanshop) && (data.campaigns_fanshop.length != 0) && ($(this.fanshop) != null)){
			$(this.fanshop).removeClassName('hidden');
		}
		if( !Object.isUndefined(data.campaigns_today) && (data.campaigns_today.length != 0) && ($(this.today) != null) ){
			$(this.today).removeClassName('hidden');
		}
		if( !Object.isUndefined(data.campaigns_active) && (data.campaigns_active.length != 0) && ($(this.currently) != null) ) {
			$(this.currently).removeClassName('hidden');
		}
		if ( !Object.isUndefined(data.campaigns_lastday) && (data.campaigns_lastday.length != 0) && ($(this.lastday) != null) ){
			$(this.lastday).removeClassName('hidden');
		}
	},

	/**
	 * Muestra Tooltip del Logotipo de campanyas en Proximamente
	 */
	getCampaignLogoTooltip: function(){
		// controlamos el comportamiento del tooltip
		this.nextCampaignTooltipControl();
		// recogemos las campaigns
		var v_incomingCampaigns = $$("#incoming-campaigns li");
		//Identificamos el producto y pasamos su posicion
        v_incomingCampaigns.each(function(item){
            item.observe('mouseover', (function(){
				var idCampaign = item.identify();
				// Intentamos no cargar de procesos innecesarios
				// TODO: de momento quitamos esta comprobacion para que el tooltip salga cuantas veces sea necesario (Fede - 15-03-11)
				// if (idCampaign !== this.currentTooltipElement){
					if (DGuardian.getFullyLoaded()) {
						// Obtenemos el tipo de campanya y su posicion dentro del array de campanyas
						var campaignType = $w(item.className)[0];
						campaignPosition = idCampaign.split("campaign-")[1];
						// Segun la posicion de la campanya mostramos el logo indicado,
						// y segun su tipo mostramos o no el mensaje del fanshop
						this._setUpLogoTooltip(campaignType);
						this.transferLogoTooltipInfo(campaignPosition);
						// Mostramos el tooltip asociado al elemento
						CampaignLogoTooltip.showNextCampaigns(item.identify());
						// Guardamos en una variable la campanya actual para evitar ejecuciones innecesarias
						// this.currentTooltipElement = idCampaign;
					}
				//}
            }).bind(this));
            item.observe('mouseout', (function(){
            	CampaignLogoTooltip.closeTooltipNextCampaigns();
            }));
        }, this);
	},
	
	/**
	 * Devuelve la cantidad segun la campanya que le pases como parametro
	 */
	getQuantityCampaign: function (objecto) {
		if( !Object.isUndefined(objecto)){
			return objecto.length;
		}

	},

	/**
	 * Obtener item a partir campanya
	 */
	getItem: function(s_campanya) {
		if (s_campanya != ""){
			return this.v_ItemLine[s_campanya];
		}
	},

	/**
	 * Devuelve el dia de la semana a partir de un numero
	 * @param {Object} day
	 */
	getDayHuman: function (day) {
		var humanday = "";

		if(day >= 0 && day <= 7) {
			humanday = this.vHumanDays[day];
		}

		return humanday;
	},	
	
	/**
	 * Obtener literal a partir de promo_type, entero
	 */
	getTypePromotion: function(i_promotion) {
		if (i_promotion != ""){
			return this.vTypePromotion[i_promotion];
		}
	},
	
	/**
	 * Metodo para el volcado de los contenedores que contendran los contadores de tiempo
	 * de las campanyas
	 * @param {Object} tplTimer - template de los contenedores
	 */
	getTimerContainer: function(tplTimer){
		var html = tplTimer.evaluate({
			campaign_counter: this.i_campaignTimerCounter
		});
		this.i_campaignTimerCounter += 1;

		return html;
	},
		
	/**
	 * Muestra la seccion 
	 */
	hideSections: function(data) {
		//Ocultar social media porque esta todo oculto, es decir show=hidden. Mostrar solo facebook
		if ( !Object.isUndefined(data.social_media) && (data.social_media != null) && (data.social_media.length != 0) ){						
			if ( this.checkIfBlockSocialMedia(data) ){
				if (this.idSocialMedia != null) {
					$(this.idSocialMedia).addClassName('hidden');
					//Si social media esta vacio se muestra el facebook
					if ( ($(this.idFacebook) != null) && ($(this.idShowFacebook) != null) ) {
						var htmlFacebook = $(this.idFacebook).innerHTML;
						$(this.idShowFacebook).update(htmlFacebook);
						$(this.idShowFacebook).removeClassName('hidden');
						if ($(this.idSeparation) != null){
							$(this.idSeparation).removeClassName('hidden');
						}
					}
				}
			}
		}
		//Ocultar la zona mobile porque esta todo oculto, es decir show=hidden
		if ( !Object.isUndefined(data.mobile_zone) && (data.mobile_zone != null) && (data.mobile_zone.length != 0) ){
			if ( this.checkIfBlockMobileZone(data) ){
				if ($(this.idZonaMobile) != null){
					$(this.idZonaMobile).addClassName('hidden');
				}
			}
		}
	},
	
	/**
	 * quitar link campanyas adultos - Por defecto estan todas a true excepto campaign adulto false(inactivo) hasta 
	 * franja horaria correcta que se activa
	 */
	
	hideLinkCampaignAdult: function() {
		$$('.' + this.noLink).each(function(link) {
			link.writeAttribute("title", '');
			link.writeAttribute("href", 'javascript:;');
		});
	},
	
	/**
	 * Comprobar si campanya esta cerrada
	 */
	isCampaignClose: function () {
		var code = this.getResTextcodes(),
		codeCampaignClose = "msg0320002", // codigo campanya cerrada
		campaignOpen = true;

		if(code == codeCampaignClose) {
			campaignOpen = false; 			//campanya cerrada -> lanzar modal
			modalCampaignClose.open();
		}
		return campaignOpen;
	},

	/**
	 * Controla el comportamiento del tooltip de proximas campaynas segun la accion del usuario
	 */
	nextCampaignTooltipControl: function(){
		$(this.idNextCampaignsTooltip).observe('mouseover', (function(){
			CampaignLogoTooltip.showTooltipNextCampaigns();
		}));
		$(this.idNextCampaignsTooltip).observe('mouseout', (function(){
         	CampaignLogoTooltip.closeTooltipNextCampaigns();
        }));
		document.observe('click', (function(){
         	CampaignLogoTooltip.closeTooltipNextCampaigns();
        }));
	},
	
	/**
	 * Muestra una franja de diferente color segun el tipo de promocion que nos pasen, (promotion, special o social)
	 */
	promotionSpecial: function(dataJson,index) {
		
		if( !Object.isUndefined(dataJson.promo_active) && !Object.isUndefined(dataJson.promo_type) && !Object.isUndefined(dataJson.promo_text) ){
			
			if (dataJson.promo_active) {
				
				if ( ( (dataJson.promo_text != "") || (dataJson.promo_text != null) ) ){
					//conversion entero a literal para convertirlo en css
					if (dataJson.promo_type != ""){
						var txtTypePromotion = this.getTypePromotion(dataJson.promo_type);
						dataJson.hidePromotion = "colour "+txtTypePromotion;
					}
					else {
						dataJson.hidePromotion = "colour";
					}
					dataJson.promotion = this.cssCampaignPromo;
					
					
					dataJson.campaign_text_promotion = dataJson.promo_text;				
				}
			}
			else {
				//dataJson.hidePromotion = "hidden";
			}
			
		}
	
		return dataJson;
	},
		
	/**
	 * Volcado de datos del bloque Campanyas activas (fanshop, hoy estrenamos, actualmente y ultimo dia)
	 */
	pushCampaigns: function (dataJson, index) {
		var target = this.getTarget(),
		tplTimer = new Template(TPL_CAMPAIGN_TIMER);

		// Volcamos los contenedores de los contadores
		dataJson.campaign_timer_container = this.getTimerContainer(tplTimer);

		//Muestra la palabra Solo y el icono timer today de la campanya Hoy estrenamos
		dataJson = this.showTextOnly(dataJson, target);	

		//Muestra enlace Ir de Shopping o Entrar en Fan Shop
		dataJson = this.showBtnTxtFanShop(dataJson, target);

		// etiqueta promo
		dataJson = this.promotionSpecial(dataJson,index);

		// salto de linea + padding
		dataJson = this.breakLine(dataJson, index, this.getItem(target));

		// campanyas adultos
		dataJson = this.campaignAdult(dataJson);

		// sumo datos a volcar
		this.addBuilt(dataJson);

	},
	
	/**
	 * Volcado de datos del bloque 
	 */
	pushHighLight: function (dataJson){
		//sumo datos a volcar
		this.addBuilt(dataJson);
	},
	
	/**
	 * Volcado de datos del bloque Zona Mobile, Social Media
	 */
	pushAsideInfo: function (dataJson, index) {
		var target = this.getTarget();	
		
		if (target == "social_media") {
			
			//vector con las claves de los diferentes objetos
			var v_keys = Object.keys(dataJson);
			
			var oValues = Object.values(dataJson);			
			
			//muestra titulo con enlace o sin enlace
			this.showHeader(dataJson, v_keys, oValues);
			
		}
		if (target == "mobile_zone") {		
			//vector con las claves de los diferentes objetos
			var v_keys = Object.keys(dataJson);
			
			var oValues = Object.values(dataJson);	
			
			//muestra titulo con enlace o sin enlace
			this.showHeader(dataJson, v_keys, oValues);
			
		}
		// sumo datos a volcar
		this.addBuilt(dataJson);

	},
	
	/**
	 * Volcado de datos del bloque Proximamente
	 */
	pushNextCampaigns: function (dataJson, index) {
		var target = this.getTarget();

		if(target == "next_campaigns") {

			// Set-Up de variables necesarias
			var element_list = '',
			hour_list = '',
			hourHTML = '',
			tplHours = new Template(TPL_INCOMING_HOUR);
			var tmpHour = '';
			for(var i=0, l =dataJson.length; i<l; i+=1){

				dataJson.dayandmonth = dataJson[i].daymonth;
				dataJson.dayofweek = dataJson[i].weekday;
				// Obtenemos las campanyas que se lanzaran en cada hora
				element_list = '';
				element_list = this._getIncomingCampaigns(dataJson[i], i);
				// si la hora de las dos campanyas consecutivas coinciden no mostramos la hora
				if(tmpHour == dataJson[i].hours)
				{
					// Mostramos las campanyas y la informacion sin hora
					hourHTML = tplHours.evaluate({
						at_copy: '',
						hour: '',
						element_list: element_list
					});
				}
				else{

					// Mostramos las campanyas y la informacion
					hourHTML = tplHours.evaluate({
						at_copy: this.getTxt('at'),
						hour: dataJson[i].hours + 'h',
						element_list: element_list
					});
				}
				hour_list += hourHTML;
				// nos guardamos la hora de la campanya para comprarala con la siguiente campanya
				var tmpHour = dataJson[i].hours;

			}

			// Para cada dia, mostramos el dia de la semana correspondiente
			switch (dataJson.dayofweek){
				case 1:
					dataJson.dayofweek = this.getTxt('sun');
					break;
				case 2:
					dataJson.dayofweek = this.getTxt('mon');
					break;
				case 3:
					dataJson.dayofweek = this.getTxt('tue');
					break;
				case 4:
					dataJson.dayofweek = this.getTxt('wed');
					break;
				case 5:
					dataJson.dayofweek = this.getTxt('thu');
					break;
				case 6:
					dataJson.dayofweek = this.getTxt('fri');
					break;
				case 7:
					dataJson.dayofweek = this.getTxt('sat');
					break;
				default:
					break;
			}
			// Lo volcamos todo a una variable presente en la template
			dataJson.hour_list = hour_list;
		}

		// sumo datos a volcar
		this.addBuilt(dataJson);
	},
	
	/**
	 * Definir y guardar el objeto de tipo Modal
	 */
	setModalPromotion: function (o_modal){
		this.modalPromotion = o_modal;
	},
	
	/**
	 * Muestra la imagen de tienda cerrada
	 */
	showStoreClosed: function () {
		if($(this.idStoreClosed) != null) {
			$(this.idStoreClosed).removeClassName('hidden');
		}
	},
	
	/**
	 * Muestra el texto Solo en la campanya Hoy estrenamos .
	 */
	showTextOnly: function(dataJson, target) {
		if ( (target == "campaigns_today") || (target == "campaigns_fanshop") ){
			dataJson.textonly = "";
			dataJson.icotoday = "ico-time-today-16";
		}
		else {
			dataJson.textonly = "hidden";
		}
		return dataJson;
	},

	/**
	 * Muestra enlace Ir de Shopping o Entrar en Fan Shop
	 */
	showBtnTxtFanShop: function(dataJson, target) {
		if ( target == "campaigns_fanshop" ){
			dataJson.btnTxtFanShop = "";
			dataJson.btnTxtShopping = "hidden";
		}
		else {
			dataJson.btnTxtFanShop = "hidden";
			dataJson.btnTxtShopping = "";
		}
		return dataJson;
	},
	
	/**
	 * Parcelados. Seccion que solo aparece en brasil
	 */
	showInstallments: function () {
		if( $(this.installments) !== null ){
			$(this.installments).removeClassName('hidden');
		}
	},
	
	/**
	 * Metodo que aplica los contadores de tiempo para las campanyas,
	 * previo volcado de los containers donde deberan ir situados
	 */
	setCampaignTimers: function(){
		var i_campaignCounter = 0;

		// Seteamos los contadores para las campanyas que estrenamos hoy
		if (this.getResData().campaigns_today !== []) {
			this.getResData().campaigns_today.each(function(item){
				if ($('campaign-timer-' + i_campaignCounter) !== null) {
					this.setTimer(item.campaign_expires, 'campaign-timer-' + i_campaignCounter);
					i_campaignCounter += 1;
				}
			}, this);
		}
		// Seteamos los contadores para las campanyas activas
		if (this.getResData().campaigns_active !== []) {
			this.getResData().campaigns_active.each(function(item){
				if($('campaign-timer-' + i_campaignCounter)!== null){
					this.setTimer(item.campaign_expires , 'campaign-timer-' + i_campaignCounter);
					i_campaignCounter += 1;
				}
			}, this);
		}
		// Seteamos los contadores para las campanyas que cierran hoy
		if(this.getResData().campaigns_lastday !== []){
			this.getResData().campaigns_lastday.each(function(item){
				if ($('campaign-timer-' + i_campaignCounter) !== null) {
					this.setTimer(item.campaign_expires , 'campaign-timer-' + i_campaignCounter);
					i_campaignCounter += 1;
				}
			}, this);
		}

	},

	/**
	 * Metodo que aplica el contador con el tiempo indicado al id indicado
	 * @param {Object} remain - tiempo restante
	 * @param {Object} id - container donde ha de mostrarse el contador
	 */
	setTimer: function(remain, id){
		if($(id)!== null){
			var countdown = $(id);
			// configuramos el intervalo de la cuenta atras
			timer = setInterval( (function () {
				// insertamos el reloj en el formato configurado, con dias y horas
				countdown.innerHTML = this.getExpiresTime (remain, 1);
				// si el tiempo restante es menor a 0 ocultamos el contador
				if (remain-- <= 0){
					clearInterval(timer);
					$(id).addClassName("hidden");
				}
			// este integer es el intervalo normal de tiempo
			}).bind(this),1000);
		}
	},
	
	/**
	 * Microsites - Metodo para mostrar el mensaje del usuario debajo del header
	 */
	setUserMsg: function(data){
		//si no hay texto oculta el div
		if(data.output_content.plain_text !== ''){
			$(this.idUserMsg).removeClassName('hidden');
		}
	},
	/**
	 * Muestra el bloque de Proximas Campanyas
	 */
	showIncomingCampaigns: function(){
		if( $(this.idNextCampaigns) !== null){
			$(this.idNextCampaigns).removeClassName('hidden');
		}
	},	

	/**
	 * Muestra el orden de la seccion segun nos pasen en el objeto order
	 */
	showOrderSection: function(data) {
		if ( !Object.isUndefined(data.order) && ( $(this.idOrderZonaMobile) != null ) && ( $(this.idOrderSocialMedia) != null ) ){
			var htmlMobileZone = $(this.idOrderZonaMobile).innerHTML;
			var htmlSocialMedia = $(this.idOrderSocialMedia).innerHTML;
			
			if (this.idOrderSocialMedia == data.order){	
				this.transferAsideSection(htmlSocialMedia, htmlMobileZone);
			}
			else if (this.idOrderZonaMobile == data.order ) {
				this.transferAsideSection(htmlMobileZone, htmlSocialMedia);
			}
			else {
				//CASOS ESPECIALES: order vacio o order con texto diferente de "order_mobile_zone o order_social_media"				
				this.transferAsideSection(htmlSocialMedia, htmlMobileZone);
			}			
		}
	},	
	
	/**
	 * Mostrar los enlaces 
	 * TODO: IE cuando el volcado tiene el title vacio devuelve el href
	 * EJEMPLO: 
	 *  FIREFOX: <a class="json4_link hidden aside_link" target="" title="" href="javascript:void(0);"> ></a>
		IE: FIREFOX: <a class="json4_link hidden aside_link" target="" title='href="javascript:void(0);"' href="javascript:void(0);"> ></a>
	 */
	showLinks: function () {		
		var v_links = $$(this.classAsideLink);
		if ( (v_links != null) && (v_links.length != 0) ) {		
			var type_navegator_ie = this.checkUserAgent("msie");
			v_links.each(function (item){
				//Esta condicion es solo para internet explorer. Se especifica el navegador porque en el volcado del title vacio
				//IE devuelve el contenido del href, es decir href="javascript:void(0);"
				if (type_navegator_ie){
					//Se anyade en IE otra condicion porque cuando el volcado esta vacio devuelve el title con 'href="javascript:void(0);"'
					if( (item.title != "") && (item.title!='href="javascript:void(0);"') ){
						if (item.hasClassName("aside_link")) {						
							$(item).removeClassName('hidden');
						}
					}
				}
				else {
					if (item.title != ""){
						if (item.hasClassName("aside_link")) {						
							$(item).removeClassName('hidden');
						}
					}
				}
			});	
		}		
	},
	
	/**
	 * Gestiona el estilo del titulo de la seccion. Con enlace o si enlace
	 * @param {Array} v_keys
	 * @param {Object} oValues
	 */
	showHeader: function (dataJson, v_keys, oValues) {
		var i=0;
		var enc= false;		
		while (i < v_keys.length && !enc){				
			if (v_keys[i] == "header") {
				enc = true;
				var s_url = oValues[i].url;
			
				if (s_url != ""){
					dataJson.showTitle =  "hidden";
				}
				else {
					dataJson.showTitleLink =  "hidden";
				}
			}
		}		
	},
	
	/**
	 * Volcado datos modal promociones 
	 */
	transferModalPromotion: function (dataJson){
		if (!Object.isUndefined(dataJson.member_actions)){
			// Si la promocion esta activada, mostramos la modal
			if (dataJson.member_actions.member_action_modal){
				
				var s_membername = dataJson.member_actions.member_name;

				//volcar datos en la modal
				this._buildModalPromotion(s_membername);
				
				//abrir modal
				this.modalPromotion.open();
				
			}
		}
	},
	
	/**
	 * Gestiona la seccion lateral
	 * @param {Object} html1
	 * @param {Object} html2
	 */
	transferAsideSection: function(html1, html2) {
		if (html1 != ""){
			$(this.idOrderSocialMedia).removeClassName('hidden');
			$(this.idOrderSocialMedia).update(html1);
		}
				
		if (html2 != ""){
			$(this.idOrderZonaMobile).removeClassName('hidden');
			$(this.idOrderZonaMobile).update(html2);
		}
	},
		
	
	/**
	 * Metodo para transferir la url de las imagenes al tooltip
	 * @param {Object} campaignLogoPosition
	 */
	transferLogoTooltipInfo: function(campaignLogoPosition){
		//Recuperamos la informacion desde el array de los logos
		var imgSrc = this.v_logoImgs[campaignLogoPosition];
				
		if($('tooltip-logo')!== null){
			$('tooltip-logo').writeAttribute("src", imgSrc);
		}
	},
	
	
	/**
	 * Volcado informacion de la modal
	 */
	_buildModalPromotion: function (s_member){
		//quitar espacios
		var s_name = this.trim(s_member);
		//anyadir la coma
		s_name = s_name + ", ";
		//volcar nombre socio
		if ( $(this.idMemberName) != null ) {
			$(this.idMemberName).update(s_name);
		}
		//volcar enlace escaparate
		if ( $(this.idLinkMicrosite) != null ){			
			$(this.idLinkMicrosite).href = this.url_microsite;			
		}
	},
	
	/**
	 * Metodo que itera sobre las campanyas que se lanzaran en horas determinadas
	 * @param {Object} v_campaigns
	 */
	_getIncomingCampaigns: function(v_campaigns, hourPosition){

		var list = '',
		elements = '',
		tplFSIncoming = new Template(TPL_FANSHOP_CAMPAIGN),
		tplIncoming = new Template(TPL_INCOMING_CAMPAIGN);

		// Volcamos las campanyas, en funcion si son de fanshop o normales
			elements = '';
			if(v_campaigns.fanshop == 'true'){
				elements = tplFSIncoming.evaluate({
					campaign_name: v_campaigns.name,
					fanshop_copy: this.getTxt('fanshop'),
					url: v_campaigns.url,
					campaign_number: this.i_campaignCounter
				});
			}else{
				elements = tplIncoming.evaluate({
					campaign_name: v_campaigns.name,
					campaign_number: this.i_campaignCounter
				});
			}
			// Asociamos el contador de campanyas con el array donde se guardaran los logos
			this._setCampaignLogo(this.i_campaignCounter, v_campaigns.logo)
			this.i_campaignCounter ++;
			list += elements;
		return list;
	},

	/**
	 * Metodo que introduce las urls de las imagenes en el array donde se almacenaran
	 * @param {Object} campaignCounter
	 * @param {Object} url_logo
	 */
	_setCampaignLogo: function(campaignCounter, url_logo){
		if(campaignCounter !== '' && url_logo !== ''){
			this.v_logoImgs[campaignCounter] =  url_logo;
		}
	},

	/**
	 * Metodo para mostrar el mensaje del Fanshop
	 */
	_setUpLogoTooltip: function(type){
		if(type === 'fanshop-campaign'){
			if($('fanshop-msg')!== null){
				$('fanshop-msg').removeClassName('hidden');
			}
		}else{
			if($('fanshop-msg')!== null){
				$('fanshop-msg').addClassName('hidden');
			}
		}
	}

});

var PrivaliaMicrositesIndex = Class.create(PrivaliaMicrositesJsonIndex, {
	initialize: function($super) {
		$super();

	}
});/**
 *  privalia.microsites.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 90-privalia.base.js
 * @revision: 	1.0
 */

/**
 * PrivaliaJsonMicrosites - Common
 * =========================================
 * @modified: 	Marcos		(25-01-11)
 */
var PrivaliaJsonMicrosites = Class.create(PrivaliaBase, {
	initialize: function($super) {
		$super();

 		//version
	   	this.version =				1.1;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaJsonMicrosites');
	},

	/**
	 * Microsites - Construye la pagina con los datos pasados por json previamente
	 */
	buildPage: function(generate) {
		switch(generate) {
			default:
				this.generateHtml();
				break;
		}
	}

});

/**
 * PrivaliaMicrosites - Common
 * =========================================
 * requieres: 	privaliaCore*, privaliaBase, privaliaJsonMicrosites
 * @modified: 	Marcos	(25-1-11)
 */
var PrivaliaMicrosites = new Class.create(PrivaliaJsonMicrosites, {
	initialize: function($super) {
		$super();
		
		 //version
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaMicrosites');
	}

});
/**
 * PrivaliaPager - Common
 * =========================================
 * @modified: 	Marcos		(27-06-11)
 */
var PrivaliaPager = Class.create(PrivaliaMicrositesBase, {
    initialize: function($super){
        $super();
        
        this.pagerOptions = Object.extend({
            actual: 1, // pagina actual
            html:				false,			// hay que generar el HTML del paginador
            id: '', // id del paginador
            offset: 0, // index de por donde empieza a mostrar
            itemsPerPage: 0, // num de items a mostrar en cada pagina
            show: 0, // num de items a mostrar en cada pagina
            total: 0, // total de items
            totalPages: 0 // numero de paginas
        });
        
        //version
        this.version =		2.2;
        this.setVersion(this.version, 'PrivaliaPager');
    },
    
    /**
   * cambiar de pagina
   */
  changePage: function (index) {
    if(Object.isNumber(index)) {
    	if(this.pagerOptions.id != '' && this.pagerOptions.html) {
	      var prefix = this.getId() + '-';
	      // primero quitamos el estilo 'active' a la pagina antigua
	   	  $(prefix + this.getPage()).removeClassName('active');
    	}
      // nueva pagina
      this.setPage(index);
      
      if(this.pagerOptions.id != '' && this.pagerOptions.html) {
	      // aplicamos a la nueva pagina el estilo
	      $(prefix + index).addClassName('active');
      }
      // nos vamos parriba
      //$('breadcrumb').scrollTo();
    }
  },

	/**
     * Inicializar la paginacion
     */
    initPager: function(id, itemsTotal, itemsPerPage){
        var i = 1,
        html = '',
	css = '',
        tplHtml = new Template(TPL_PAGINATION);
        
        if (id != '') {
            this.pagerOptions.id = id;
            this.resetPager();
            
            if (itemsTotal > 0 && itemsPerPage > 0) {
                this.pagerOptions.total = itemsTotal;
                this.pagerOptions.show = itemsPerPage;
                this.pagerOptions.totalPages = Math.ceil(itemsTotal / itemsPerPage);
                
        		if(this.pagerOptions.html) {
	                // anterior
	                if (this.pagerOptions.totalPages > 1) {
	                    this._setPageOption(id, 'previous', 'label');
	                }
	                
	                // paginas
	                if (this.pagerOptions.totalPages <= 1) {
	                    //solo una pagina
	                    css = "active-one";
	                    this._setPageOption(id, i, css);
	                    
	                }else{
	                    while (i <= this.pagerOptions.totalPages) {
	                        css = '';
	                        // por defecto, el primero activo es el 1
	                        if (i == 1) {
	                            css = 'active';
	                        }
	                        else 
	                            if (i == this.pagerOptions.totalPages) {
	                                css = 'last';
	                            }
	                        
	                        this._setPageOption(id, i, css);
	                        
	                        i++;
	                    }
	                }
	                
	                // siguiente
	                if (this.pagerOptions.totalPages > 1) {
	                    this._setPageOption(id, 'next', 'label');
	                }
	                
	                // formtaear css
	                if (!$(id).hasClassName('pager')) {
	                    $(id).addClassName('pager');
	                }
            	}
        	}
    	}
    },
    
    /**
     * Obtener id del paginador
     */
    getId: function(){
        return this.pagerOptions.id;
    },
    
    /**
     * Obtener pagina actual
     */
    getPage: function(){
        return this.pagerOptions.actual;
    },
    
    /**
   * Obtener total de paginas
   */
  getTotalPages: function() {
	  return this.pagerOptions.totalPages;
  },
  
  /**
     * Ir a pagina. El numero de la pagina lo obtiene del id
     */
    gotoPage: function(evt){
        var b_continue = false,
        index = 0,
        v_index = evt.target.id.split("-");
        
        if (v_index.size() > 1) {
            index = parseInt(v_index[1]);            
      		this.changePage(index);
            b_continue = true;
        }
        return b_continue;
    },
    
    /**
     * retroceder una pagina
     */
    previousPage: function(evt){
        var b_continue = false,
	index = 0;
        
        if (this.pagerOptions.actual > 1) {
            var v_index = evt.target.id.split("-");
            if (v_index.size() > 1) {
                index = this.getPage() - 1;
       			this.changePage(index);
                b_continue = true;
            }
        }
        return b_continue;
    },
    
    /**
     * avanzar una pagina
     */
    nextPage: function(evt){
        var b_continue = false,
	index = 0;
        
        if (this.pagerOptions.actual < this.pagerOptions.totalPages) {
            var v_index = evt.target.id.split("-");
            if (v_index.size() > 1) {
                index = this.getPage() + 1;
        		this.changePage(index);
                b_continue = true;
            }
        }
        return b_continue;
    },
    
    /**
     * restear paginador
     */
    resetPager: function(){
        if (this.pagerOptions.id != '') {
            $(this.pagerOptions.id).update('');
            
            this.pagerOptions.actual = 1;
            this.pagerOptions.offset = 0;
            this.pagerOptions.totalPages = 0;
        }
    },
    
    /**
     * setear offset. a partir de que numero que ha de empezar a contar
     */
    setOffset: function(i){
        this.pagerOptions.offset = (i - 1) * this.pagerOptions.show;
    },
    
    /**
     * Setear la pagina actual
     */
    setPage: function(i){
        if (Object.isNumber(i)) {
            this.pagerOptions.actual = i;
            this.setOffset(i);
        }
        else {
            if (typeof(DGuardian) != 'undefined') {
                DGuardian.log('PrivaliaMicrositesJsonShopwindow.setPage@ No es numero: ' + i);
            }
        }
    },
    
    /**
     * Creamos una pagina
     */
    _setPageOption: function(id, index, css){
	var content = '';
        if (id != '') {
            if (arguments.length == 2) {
                css = '';
            }
            
            // crear DOM enlace index
            var a = new Element('a', {
                'id': id + '-' + index,
                'href': 'javascript:;',
                'class': css
            });
            
            switch (index) {
                case 'previous':
                    content = '< ' + this.getTxt('preview');
                    a.observe('click', this.previousPage.bind(this));
                    break;
                    
                case 'next':
                    content = this.getTxt('next') + ' >';
                    a.observe('click', this.nextPage.bind(this));
                    break;
                    
                default:
                    content = index;
                    a.observe('click', this.gotoPage.bind(this));
                    break;
            }
            
            // escribir contenido (index)
            a.update(content);
            
            // crear DOM elemento listado y le metemos el enlace
            var li = new Element('li');
            $(li).insert({
                top: a
            });
            
            // lo metemos dentro del target paginador
            $(id).insert({
                bottom: li
            });
        }
    }
});

/**
 * PrivaliaMicrositesJsonShopwindow - Common
 * =========================================
 * @modified: 	Ignacio		(28-06-11)
 */
var PrivaliaMicrositesJsonShopwindow = Class.create(PrivaliaPager, {
    initialize: function($super){
        $super();

        // [CONFIG]
        // configurables
        this.b_titleFlow =					true;			// habilitar titulo categoria siempre visible
        
        // configurables datagrid de productos
    	this.i_numOfLines =					3;				// numero de filas a mostrar
    	this.b_seeMoreAuto =				true;			// activar ver mas productos automatico
    
    	// [SYSTEM]
        // variables internas
        this.b_maxProdRendered = 			false; 			// ha renderizado el max de productos a renderizar
        this.b_dgridMode = 					true; 			// modo datagrid de productos
        this.b_Installments = 				false; 			// flag boolean para saber si hay parcelados en la campanya
        this.i_prodRendered = 				0;				// productos renderizados
        this.idCategoryData = 				'category_data';
        this.idBrandCampaign = 		'brandpicture'; 		// id imagen de la campanya
        this.idCurrentTitle = 				'currentTitle'; //id donde se monta el category | subcategory 
        this.idVisualOptions = 		'visualizationoptions'; 	//id donde se monta el category | subcategory
    	this.b_initialLoad =				true;
		
    	// ver mas productos
    	this.seeMore = Object.extend({
    		available:						true,			// el btn ver mas productos esta disponible
    		id:								'btnMoreProducts',	// el id del boton
    		posY:							0				// posicion Y del boton
    	});
        
        this.v_itemsPerLine = []; 							// array de num de items a mostrar en las diferentes vistas
        this.v_itemsPerLine['secondView'] = 3; 		// num de items a mostrar por linea en la primera segunda vista
        this.v_itemsPerLine['thirdView'] = 5; 		// num de items a mostrar por linea en la primera tercera vista
        this.v_maxItems = []; 								// array de num de items a mostrar en las diferentes vistas
        this.dgrid = Object.extend({
            s_defaultView: 'secondView', // mostrar vista por defecto
            i_maxItems: 6, 									// num de items a mostrar por defecto
            i_totalProd: 0 									// total de productos
        });
        
        this.id_view = this.dgrid.s_defaultView; 			// inicialmente toma el valor por defecto y luego se sobreescribe en el selectView
        // filtro de categorias + tallas + ordenacion
        this.filter = Object.extend({
            i_cat: this.getUrlParamValue('category'), 			// PK de la categoria (aqui pueden ser pk's de subcategorias tambien)
            i_order: 1, 									// Filtro de ordenacion (precio ascendente, descendente, disponibilidad... etc)
            v_sizes: []
        });
        
        // inicializar filtros desde la URL
        var order = this.getUrlParamValue('order');
        if (order) {
        	this.filter.i_order = order;
        }
        var size = this.getUrlParamValue('size', this.getUrl());
        if (size) {
        	this.filter.v_sizes[0] = decodeURIComponent(decodeURIComponent(size));
        }

        this.s_text = '';									//texto combo tallas, seleccionar tallas (producto) o seleccionar (servicio)
        
        // filtro de tallas
        this.idSizesMenuFilter = 	'product_filter_cont'; 	// id del menu desplegable de tallas
        this.sizeFilterAvailable = 0; 						// valor que indica si el filtrado de tallas esta activado
        this.idFilterProducts = 'filter-products';
        this.idFilterSizeMenu = 	'filterSize'; 			// id del menu de filtrado de tallas
        this.idSizeFilter = 		'size-filter-form';
        this.idFilterButton = 		'sf-reset-button';
        this.idSizeFilterTxt = 		'size-filter-info';
        this.i_sizeFilterCounter = 	0;
        this.v_availabilityText = 	[];
        this.i_checkedSizes = 		0;
        this.s_campaignImg = 		''; 					// url de la foto de campanya
        this.b_showAddButton = 		false; 					// indica que se tiene que mostrar el boton de comprar
        this.v_productPk = 			[]; 					// almacena las pk de los productos que solo tienen una talla        
        this._dirty = false;							// guarda si es necesario recargar el listado porque ha habido cambio en algún filtro
        
        //version
        this.version =		4.3;
        this.setVersion(this.version, 'PrivaliaMicrositesJsonShopwindow');
        
        // numero de filas a mostrar
        this.setMaxItemsPerView(this.i_numOfLines);
    },
	
	/**
	 * Metodo que permite la continuacion de la compra
	 */
	adultConditionsAccepted: function(modal, PK){
		//Llamada Ajax para cambiar el flag
		var url_changeAdultCondition = "/microsites/acceptAdultCampaign/campaign/" + PK;
		//cambiamos el estado del flag de condiciones
		this._callAcceptAdultConditions(url_changeAdultCondition, modal);
	},
    
    /**
     * Machaca el addBuilt generico porque
     */
    addBuiltProduct: function(dataJson){
        if (this.b_dgridMode) {
            if (this.dgrid.i_totalProd >= this.pagerOptions.offset) {
                if (this.i_prodRendered < this.dgrid.i_maxItems) {
                    this.i_prodRendered++;
                    this.addBuilt(dataJson);
                }
                else {
                    this.b_maxProdRendered = true;
                }
            }
            this.dgrid.i_totalProd++;
        }
        else {
            this.addBuilt(dataJson);
        }
    },
    
    /**
     * Filtrado de Tallas - Suma productos al total de disponibles para cada talla
     * @param {Object} i_availability - numero de productos a sumar
     */
    addProduct: function(i_availability){
        this.i_sizeFilterCounter += i_availability;
        var s_msgCounter = '';
        
        if (this.i_sizeFilterCounter == 1) {
            s_msgCounter = this.v_availabilityText[0];            
            
        } else {
            s_msgCounter = this.v_availabilityText[1] + this.i_sizeFilterCounter + this.v_availabilityText[2];
        }
        if ($(this.idSizeFilterTxt) !== null) {
            //$(this.idSizeFilterTxt).update(s_msgCounter);
            //$(this.idSizeFilterTxt).show();
        }
    },
    
    /**
     * Filtrado de tallas - Actualizacion (suma) de la clase selected
     * @param {Object} item - checkbox marcado por el usuario
     */
    addSelected2: function(item){
        //Obtenemos la lista de clases del objeto
        var v_AdClasses = $w(item.className);
        item.addClassName("selected-1");
        item.removeClassName("hidden");
    },
    
    /**
     * Filtrado de tallas - Actualizacion (suma) de la clase selected
     * @param {Object} item - checkbox marcado por el usuario
     */
    addSelected: function(item){
        //Obtenemos la lista de clases del objeto
        var v_AdClasses = $w(item.className);
        
        //Obtenemos la clase original
        var s_originalClass = v_AdClasses.detect(this._beginsWithSelected.bind(this));
        if (s_originalClass == undefined) {
            item.removeClassName("hidden");
            item.addClassName("selected-1");
            
        } else {
            //Obtenemos el nuevo nombre de la clase sumando al original
            var s_newClassNumber = s_originalClass.substring(9, 11);
            s_newClassNumber++;
            var s_newClass = s_originalClass.substring(0, 9).toLowerCase() + s_newClassNumber;
            
            //Asignamos la nueva clase, previa eliminacion de la anterior
            item.removeClassName(s_originalClass);
            item.addClassName(s_newClass);
        }
    },
     
    /**
     * Microsites - Construye la pagina con los datos pasados por json previamente
     */
    buildPage: function(generate){
        switch (generate) {
            // shop window
            case 'shopwindow':
            default:
            	 this.s_text = this.getTxt('selectSize');
                
                // definimos la parte estatica del breadcrumb para que se genere cada vez q se cargan los productos
                this.setSection({
                    'bread_name': BREADSECTION["shopwindow"],
                    'bread_url': '/microsites/index'
                });
                // obtenemos breadcrumb dinamico
                this.getDataBreadcrumb(this.getResData());
                this.buildBreadcrumb();
                 
                // Venta de Servicios: condicion para cmabiar el texto de seleccionar talla
                 if (Country.getService()) { 
                 	var Service = new PrivaliaSellingServices(this.getResData(), '');
                 	if( Service.isService() ) {
                 		this.s_text = this.getTxt('selectSizeService');
                 	}
                 }
                
                // mostrar vista y renderizar
                this.selectView(this.id_view);
                this.setCampaignImage();
                
                // comprobamos si el filtrado de tallas esta habilitado
                this.checkSizesFilter();
                // Volcamos las tallas disponibles
                if (this.sizeFilterAvailable) {
					// guardamos las tallas obtenidas en un mapa de talla a id de talla
					var sizes_filter = this.getResData().product_filter.sizes_filter;
					this.buildSizeIdMap(sizes_filter.campaign_sizes);
				}
                if (this.filter.v_sizes.length > 0) {
					this.putSizes(this.getSizeIdByValue(this.filter.v_sizes[0]));	                	
                } else {
                	this.putSizes();
                }

                if(this.b_initialLoad) {
                	// ver mas productos incremental automatico
                	if(this.b_seeMoreAuto) {
                		this.initSeeMoreProductsAuto();
                	}
                	
                	// titulo de categoria siempre visible
                	if(this.b_titleFlow) {
                		this.initTitleFlow();
                	}
                }
				
				// Campanyas para Adultos
				// Compruebo si el usuario ya ha aceptado las condiciones
				if (this.getResData().campaign_data.adult_campaign_accepted === 0){
					//TODO: Marcos - Pasar la modal como referencia
					if(typeof(modalAcceptAdultConditions) !== undefined){
						modalAcceptAdultConditions.open();
					}
				}
                this.b_initialLoad = false;
	    	// Modulo Social
		var Social = new PrivaliaSocial(this, 'shopwindow', this.getIsAdultCampaign(this.getResData()));
                break;
        }
    },
    
    /**
     * Construye el titulo de categoria - subcategoria en el datagrid de productos
     */
    buildTitle: function(s_category, s_subcategory){
        var html = '';
        
        if (s_category != '' || s_subcategory != '') {
        
            var tpl = new Template(TPL_CATEGORY_TITLE);
            html = tpl.evaluate({
                category: s_category,
                subcategory: s_subcategory
            });
        }
        
        return html;
    },
    
    /**
     * Microsites - Constructor de URLs
     * para getDatas a partir de la URL del navegador
     */
    buildUrlGetData: function(page, setUrl){
        switch (page) {
            // listado de productos
            case 'shopwindow':
            default:
                // Pasamos la url por defecto en caso de no haber aplicado ningun filtro (categoria, subcategoria), ordenando por defecto segun precio
                if (setUrl == undefined || setUrl == '') {
                    var campaign = this.getUrlParamValue('campaign'),
                    category = this.getUrlParamValue('category');
                    if (campaign != '' && category != '') {
                        var urlGetData = "/microsites/getCategoryProductsData/campaign/" + campaign + "/category/" + category;
                    }
                    // añadimos order y size si están en la URL (Esto ya no se necesita)
                    /*var order = this.getUrlParamValue('order');
                    if (order) {
                    	urlGetData += "/order/" + order;
                    }
                    var size = this.getUrlParamValue('size', this.getUrl());
                    if (size) {
                    	urlGetData += "/size/" + size;
                    }*/
                }
                // Pasamos la url con los filtros aplicados
                else {
                    var urlGetData = setUrl;
                }
                break;
        }
        return urlGetData;
    },
    
    /**
     * Estructura de los elementos del filtro de tallas
     * @param {Object} data
     */
    buildSizeFilterOption: function(data){
        var optionTpl = new Template(TPL_SIZE_FILTER),        //var optionTpl = new Template(TPL_SIZE_FILTER),
        html = optionTpl.evaluate(data);
        return html;
    },
        
    /**
     * Comprueba que la talla este disponible
     * @param {Object} data
     */
    sizeFilteredAvailable: function(data){
    	var v_sizes = data,
    	i_max = v_sizes.length,
    	i=0,
    	b_findsize=false, 
    	o_size = {},
    	s_sizeSelected = this.filter.v_sizes[0];
         
         while (i < i_max && !b_findsize) {
             o_size = v_sizes[i];           
             if ( (o_size.prodf_websize == s_sizeSelected) && (o_size.quantity > 0) ) {
            	 b_findsize=true;
             }
             i++;
         }
    	
    	return b_findsize;
    },
    
    /**
     * Construye y muestra u oculta el select de las tallas
     * @param {Object} dataJson
     */
    buildSelectSize: function(dataJson) {
    	var s_options = '',
		cssSelect = '',
		cssSpanUniqueSize = '',
		selectDisabled = '',
		s_textUnique = '',
		s_selectedOption  = '',
		s_optionDefault  = '';
		
		// por defecto deshabilitamos el boton anyadir
		dataJson.disableButton = 'disableButton';
		
		// por defecto el span estara oculto hasta que se vuelque el texto "Talla unica"
		dataJson.cssSpanUniqueSize = 'hidden ';
		
		// 1. DETECTAR MOSTRAR/OCULTAR SELECT, O MOSTRAR TEXTO
		if ( !Object.isUndefined(dataJson.product_sizes) && (dataJson.product_sizes != null) ) {
			
			if ( !Object.isUndefined(this.getResData().campaign_data) && (this.getResData().campaign_data != null) ){
				// recogemos el nombre de la talla
				if(dataJson.product_sizes.size() > 0) {
					//antes se cogia el atrbuto prodf_name, nombre corto pero ahora se coge el atributo prodf_websize, nombre largo
					var s_size = dataJson.product_sizes[0].prodf_websize;
				
				// si producto no tiene talla, es decir "NO", no se mostrar select
				if(s_size == 'NO') {
					cssSelect = 'hidden';
					dataJson.disableButton = '';
				}
				// SERVICIO: UNICO, no se mostrar select
				else if (this.getResData().campaign_data.campaign_product_types.service == '1') {					
					if (s_size != '') {
						if (s_size == "UNICO") {
							cssSelect = 'hidden';
							dataJson.disableButton = '';
						}
					}
				}
					//PRODUCTO: UNICO, se mostrara el texto "Talla unica"
				else {					
					if (s_size != ''){ 
						
						if ( s_size == "UNICO") {						
							cssSelect = 'hidden';
							dataJson.cssSpanUniqueSize = '';
							s_textUnique = this.showTxtUniqueSize();
							dataJson.disableButton = '';
							//si el producto es unico y esta agotado el boton debe de aparecer deshabilitado
							if (dataJson.product_quantityAvailable == 0) {
								dataJson.disableButton = 'disableButton';
							}
						}
					}
				}
			}
			}
			// 2. si esta agotado, deshabilitamos select
			if (dataJson.product_quantityAvailable == 0) {
				cssSelect += ' disableButton';
				selectDisabled = 'disabled="disabled"';
			}
						
			// 3. Si se esta filtrando talla, seleccionar por defecto la talla filtrada
			if ( !Object.isUndefined(this.filter) && (this.filter != null) ){
				if(this.filter.v_sizes.size() > 0){
					s_selectedOption = this.filter.v_sizes[0];
					
					// si filtramos, habilitamos boton salvo si esta agotado
					if (dataJson.product_quantityAvailable != 0) {
						//Compobrar si la talla filtrada esta habilitada para mostrar el boton
						if(this.sizeFilteredAvailable(dataJson.product_sizes)) {
							// activa boton anyadir
							dataJson.disableButton = '';
						}					
					}
				}
			}
			
	    	// 4. CREAMOS SELECT: alimentamos los options		
			s_options = this.feedSelectSize(dataJson.product_sizes, s_selectedOption);
			
			// Ponemos opcion "Seleccionar talla", si hay 2 o mas tallas a elegir. Si solo hay 1, no.
			// La razon es porque al anyadir a la cesta necesita el product y al ser el primero seleccionar talla no se le esta pasando
			// El error es un error 400, te hecha de la sesion
			// this.s_text, varia segun si es producto o servicio
			if(dataJson.product_sizes.size() >= 2) {
				s_optionDefault = '<option value="">' + this.s_text + '</option>';
			}
			else {
				//solo hay una talla en el select y es la seleccionada y no esta agotado. 
				//1. Nos guardamos la talla y la url para poder arrastrar la talla seleccionada al combo del detalle del producto.
				//Cuando es un tipo de talla UNICO no hace falta arratrar la talla, ya que no se muestra el combo en el detalle del producto
				if ( dataJson.product_sizes !== undefined && dataJson.product_sizes.size() == 1) {				
					var sSize = dataJson.product_sizes[0].prodf_websize;
					if ( sSize != "" && sSize != "UNICO" ) {
						dataJson.productsize = dataJson.product_sizes[0].prodf_websize;
						dataJson.urlproduct = dataJson.detail_url;
					}
				}
				//2.Habilitar el boton
				if(dataJson.product_quantityAvailable != 0) {
					dataJson.disableButton = '';
				}
			}
			//nota: siempre se debe de cargar el select, ya que se esta pasando el product por eso se oculta o se muestra segun la casuistica
			dataJson.options_sizes = '<select id="select-id-' + dataJson.product_PK + '" name="product" class="marright5 select-product-list ' + cssSelect + '" onChange="Data.showListAddButton(\'productForm_' + dataJson.product_PK + '\',this.value); Data.getUrlProductSize(this.id);" ' + selectDisabled + '>' + s_optionDefault + s_options + '</select> ' + '<span class="'+ dataJson.cssSpanUniqueSize + 'clr-white">' + s_textUnique + '</span>';
		}
		
		return dataJson;
    },
    
    /**
     * Comprobamos que el producto tiene las tallas seleccionadas en el filtro de tallas
     * @param {Object} dataJson
     */
    checkProductHasSizes: function(dataJson){
        if (this.filter.v_sizes.size() > 0) {
            var b_hasSize = false, 
            i = 0, size = {}, 
            exist = '', 
            v_sizes = dataJson.product_sizes, 
            max = v_sizes.length;
            
            // para cada talla que tenga stock, comprobamos si dicha talla esta seleccionada en el filtro
            while (i < max && !b_hasSize) {
                size = v_sizes[i];
                // lo hacemos aunque este agotado
                //if (size.quantity > 0) {
                    // comprobamos si dicha talla esta seleccionada en el filtro
                    exist = this.filter.v_sizes.indexOf(size.prodf_websize);
                    if (exist != -1) {
                        b_hasSize = true;
                    }
               // }
                i++;
            }
        }
        else {
            b_hasSize = true;
        }
        return b_hasSize;
    },
    
    /**
	* comprueba si hay mas productos que mostrar, para mostrar el boton o no
	*/
  	checkMoreProducts: function () {
		if(this.getVersion('PrivaliaPager') >= 2.0 && this.getVersion('PrivaliaMicrositesJsonShopwindow') >= 3.0) {
			// si hay mas productos que mostrar, mostramos el boton ver mas
			if(this.seeMore.id != '' && this.getPage() < this.getTotalPages()) {
				$(this.seeMore.id).show();
				this.seeMore.available = true;
			}
			else {
				$(this.seeMore.id).hide();
				this.seeMore.available = false;
			}
			
			$(this.seeMore.id).stopWaiting();
		}
    },

  	/**
     * Recoge el valor que indica si el filtro de tallas esta habilitado
     */
    checkSizesFilter: function(){
        // recogemos el valor de filtro de tallas
        if (this.getResData().product_filter != null) {
            this.sizeFilterAvailable = this.getResData().product_filter.sizes_filter.filter_active;
        }
    },
          
    /**
     * Controla las tallas seleccionadas en el desplegable de tallas
     * Y las anyade al array de tallas
     * TODO: Marcos - Deprecated
     */
    findSizeinArray: function(size){
        // si no existen tallas
        if (this.filter.v_sizes.length == 0) {
            // se anyade al array
            this.filter.v_sizes.push(size);
        }
        else {
            // si existen tallas en el array
            var i = 0, found = false;
            
            // buscamos si ya existe en el array
            while (i < this.filter.v_sizes.length && !found) {
                // si existe la talla, la quito
                if (this.filter.v_sizes[i] == size) {
                    // se quita la talla del array
                    this.filter.v_sizes = this.filter.v_sizes.without(size);
                    // rompemos el while
                    found = true;
                }
                i++;
            }
            // si no se ha encontrado la talla
            if (!found) {
                // la anyadimos en el array
                this.filter.v_sizes.push(size);
            }
        }
    },
    
    /**
     * Averigua si hay que introducir un alpha para eliminar el margen de la
     * izquierda
     */
    getAlpha: function(productNumber, view){
	var res = '';
		
        if (productNumber != null && view != null) {
            if ((productNumber) % (view / this.numeLines) === 0) {
                res = " alpha";
            } else {
                res = "";
            }
            return res;
        }
    },
    
    /**
     * Averigua si hay que introducir un clear segun la posicion del producto en el listado segun la vista en la que estamos
     */
    getClearing: function(productNumber, view){
    	var sRes = '';    
        if (productNumber != null && view != null) {
            if ((productNumber + 1) % (view / this.numeLines) === 0) {
	            sRes = "clear";
            } else {
                sRes = "hidden";
            }
            return sRes;
        }
    },
    
    /**
     * Recogemos la url por donde nos pasan los datos en JSON
     */
    getData: function($super, page){
        var url = '';
        // en caso de cargar la pagina se hace un getdata con los filtros predeterminados
        if (!this.reloading) {
            url = this.buildUrlGetData(page);
        }
        // si es un reload porque se ha hecho una combianacion de filtros (categoria o subcategoria o orden)
        // se pasa la url montada en base a los filtros
        else {
            url = this.getUrlGetData();
        }
        $super(url);
    },
    
    /**
     * Nos devuelve el valor en numero de los productos a mostrar en la seleccion de vista actual
     */
    getNumView: function(){
        i_numView = this.v_maxItems[this.id_view];
        return i_numView;
    },
    
    /**
     * Listado de Productos - Devuelve los Checkboxes correspondientes a las tallas que pueden ser filtradas
     * @param {Object} sizesFilter - Objeto que contiene la informacion del filtro de tallas
     * @param {String} selected - ID de la talla que debe aparecer seleccionada
     */
    getSizeCheckboxes: function(sizesFilter, selected){
    	if (!selected) {
    		selected = 'all-sizes';
    	}
        var obj = sizesFilter.campaign_sizes, 
		option = {}, 
		sizeFilter = {
		s_sizeId: 'all-sizes',
			css: (selected == 'all-sizes') ? 'active' : '',
		s_sizeString: this.getTxt('allSizes')
        }, 
	// anyadimos la opcion de TODAS
 	html = this.buildSizeFilterOption(sizeFilter);
        
        // por cada uno de ellas
        obj.each(function(item){
            option = {
                s_sizeId: "size-" + item.size_class,
                s_sizeString: item.prodf_websize,
                css: (selected == 'size-' + item.size_class) ? 'active' : ''
            };
            html += this.buildSizeFilterOption(option);
        }, this);
        
        return html;
    },
    
    /**
     * Listado de Productos - Devuelve las clases asociadas a cada talla
     * @param {Object} productSizes - objeto que contiene las tallas disponibles para cada producto
     */
    getSizeClasses: function(productSizes){
        var s_sizeClasses = '';
        
        productSizes.each(function(item){
            s_sizeClasses += "size" + item.size_class + " ";
        });
        
        return s_sizeClasses;
    },
    
    /**
     * Listado de Productos - Devuelve los span con las tallas disponibles para tal producto
     * @param {Object} productSizes - objeto que contiene las tallas disponibles para cada producto
     */
    getSizeNames: function(productSizes){
        var s_sizeNames = "",
	option = {},
        TPL_sizeNameSpan = "<span class=\"size-info #{s_sizeClass}\">#{s_sizeString}</span>",
        tpl = new Template(TPL_sizeNameSpan);
        
        productSizes.each(function(item){
            var mark = '';
            
            // detectar si esta talla se esta filtrando. lo marcaremos
            if (this.filter.v_sizes.indexOf(item.prodf_websize) != -1) {
                mark = 'active'
            }
            
            option = {
                s_sizeClass: "size" + item.size_class + " " + mark + " ",
                s_sizeString: item.prodf_websize
            };
            
            s_sizeNames += tpl.evaluate(option);
        }, this);
        
        return s_sizeNames;
    },
    
    gotoPage: function($super, evt){
        if ($super(evt)) {
            this.renderGrid();
        }
    },
    
    /**
     * Iniciar el proceso automatico de ir cargando mas productos a medida que haces scroll hacia abajo
     */
    initSeeMoreProductsAuto: function () {
		// ver mas productos incremental automatico
		Event.observe(window, 'scroll', this.onScroll.bind(this));
	},
	
	/**
     * Inicia la modalidad de ver titulo de categoria - subcategoria siempre visible
     */
    initTitleFlow: function () {
    	this.currentTitleY = $(this.idVisualOptions).cumulativeOffset().top;
    	Event.observe(window, 'scroll', this.onScrollTitleFlow.bind(this));
    },
	
	/**
	 * Machacamos el nextPage original del Pager, queremos que en el listado vaya agregando los productos debajo
   	*/
	nextPage: function () {
	  if(this.seeMore.id != '' && this.getVersion('PrivaliaPager') >= 2.0 && this.getVersion('PrivaliaMicrositesJsonShopwindow') >= 3.0) {
		  $(this.seeMore.id).startWaiting();
		  var index = this.getPage() + 1;
		  this.changePage(index);
		  this.renderGrid('add'); // pasamos el param 'add' para decir que agregue al listado, y no que sustituya
        }
    },
    
    /**
     * Evento que controla cuando haces scroll, hay que cargar mas productos debajo
     */
    onScroll: function() {
    	var margin = 50;
    	
  		if(this.seeMore.available) {
	  		this.setPositionBtnSeeMoreProds();
	  		
	  		var viewportY = document.viewport.getHeight();
	  		var scrollY = $(this.seeMore.id).cumulativeScrollOffset().top;
	  		var y = viewportY + scrollY + margin;
	  		
	  		if(y > this.seeMore.posY) {
	  			this.seeMoreProducts();
	  		}
  		}
  	},
  	
  	 /**
     * Evento que controla cuando haces scroll, hay que mantener el titulo visible en la parte superior
     */
    onScrollTitleFlow: function () {
    	// obtener altura del Scroll de la pagina
    	var y = $(this.idVisualOptions).cumulativeScrollOffset().top;
    	var margin = 0;
    	var height = $(this.idVisualOptions).getHeight();

    	// detectar cuando se oculta el titulo al hacer scroll
    	if(y >= (this.currentTitleY + margin)) {
    		// hay que posicionar el titulo en la parte superior
    		$(this.idVisualOptions).setStyle({
    			position:'fixed',
    			top: '0px',
    			width: '760px',
    			zIndex: '40'
    		});
    		$(this.idCategoryData).setStyle({
    			position:'relative',
    			marginTop: height+'px'
    		});
    		$(this.idmenuFlow).setStyle({
    			position:'fixed',
    			top: '0px',
    			display: 'block',
    			zIndex: '40'
    		});
    	} else {
    		// caso normal, no se posiciona el titulo 
    		$(this.idVisualOptions).setStyle({
    			position:'static',
    			top: '0px',
    			width: '760px'
    		});
    		$(this.idCategoryData).setStyle({
    			position: 'static',
    			marginTop: '0px'
    		});
    		$(this.idmenuFlow).setStyle({
    			position: 'static',
    			marginTop: '0px'
    		});
    	}
    },
  	
	/**
	 * Marcos - Deprecated?
	 * @param {Object} $super
	 * @param {Object} evt
	 */
    previousPage: function($super, evt){
        if ($super(evt)) {
            this.renderGrid();
        }
    },
    
    /**
     * Volcado del listado de productos y filtrado de tallas
     */
    pushList: function(dataJson, index){
        // el target va a nivel del primer objeto despues de data, category_products = dataJson
        var target = this.getTarget();
        
        if (target == this.idCategoryData) {
            // contador para las subcategorias
            var i = 0, 
	    i_maxSubcats = 0, 
			i_maxProducts = 0, 
			o_subcat = {}, 
			v_subcats = [], 
			v_products = [];
            
            // recogemos el array de las subcategorias relacionadas con la categoria escogida, que a su vez
            // contienen un array de productos por cada subcategoria
            if (!Object.isUndefined(dataJson.subcategories_data)) {
                v_subcats = dataJson.subcategories_data;
                // cantidad de subcategorias segun la categoria escogida
                i_maxSubcats = v_subcats.size();
            }
            
            // si no tiene subcategorias, quiere decir que los productos cuelgan a nivel de categoria
            if (i_maxSubcats == 0) {
                if (!Object.isUndefined(dataJson.category_products)) {
                    v_products = dataJson.category_products;
                    this._addProductsOfSubcategory(v_products);
                }
            }
            else {
                while (i < i_maxSubcats) {
                    o_subcat = v_subcats[i];
                    // accedemos al objeto que nos da la info de los producots existentes en la subcategoria recorrida y lo almacenamos en una array
                    if (!Object.isUndefined(o_subcat.subcategory_products)) {
                        v_products = o_subcat.subcategory_products;
                        this._addProductsOfSubcategory(v_products);
                    }
                    i++;
                }
            }
        } else {
            this.addBuilt(dataJson);
        }
    },
    
    /**
     * Vuelca las tallas disponibles en el menu por las que se puede filtrar el listado de productos
     */
    putSizes: function(selected){
        // Si el filtro esta activo, generamos los elementos que sean necesarios para el menu de filtrado de tallas
        if (this.sizeFilterAvailable == 1 && Country.getSizeFiltering()) {
            var sizes_filter = this.getResData().product_filter.sizes_filter, // recogemos las tallas disponibles
            size_filter_checkboxes = this.getSizeCheckboxes(sizes_filter, selected); // procesamos las tallas para convertirlas elementos del combo
            
            if($(this.idFilterSizeMenu)!== null){
	            // volcamos los items en el menu de tallas
            	$(this.idSizesMenuFilter).update(size_filter_checkboxes);
            	// mostramos el menu de tallas
            	$(this.idFilterSizeMenu).removeClassName("hidden");
            	// aplicamos clase size al contenedor de los filtros para controlar el caso que se activen los 4 filtros a la vez
				$(this.idFilterProducts).addClassName('size');
				if (selected) {
					// actualizamos el label
					var idCurrentList = $(selected).ancestors()[1];
					var idLabel = $(idCurrentList).identify() + "_label";
					var label = $(selected).descendants()[0];
					var s_label = $(label).innerHTML;
					$(idLabel).update(s_label);
				}
			}
        } else {
            if($(this.idFilterSizeMenu)!== null){
            // ocultaoms el menu de tallas
            $(this.idFilterSizeMenu).addClassName("hidden");
			}
        }
    },
    
	/**
	 * Personalizacion de la funcion reload en shopwindow
	 * @param {Object} $super
	 */
    reload: function($super){
        this.resetProductsCounter();
        // y hacemos el reload normal
        $super();
    },
    
    /**
     * Filtrado de tallas - Actualizacion (resta) de la clase selected
     * @param {Object} item - checkbox marcado por el usuario
     * Marcos - Deprecated?
     */
    removeSelected2: function(item){
        //Obtenemos la lista de clases del objeto
        var v_AdClasses = $w(item.className);
        item.removeClassName("selected-1");
        if (this.i_checkedSizes > 0) {
            item.addClassName("hidden");
        }
    },
    
   /**
    * Procesar y renderizar los productos
   	* @param string s_mode - opcional - valores posibles:
   	* 	"push" o "" --> por defecto. vuelca el contenido en el div. va reemplazando
   	* 	"add" --> va agregando el contenido volcado debajo
    */
  	renderGrid: function (s_mode) {	  
  		var options = {};
		
	  if(s_mode != 'add') {
        // transicion visual
        $(this.idCategoryData).setOpacity(0.3);
	  }
	  
	  this.resetProductsCounter();
        
        // volcado
	  if(s_mode !== undefined) {
		  // nos pasan el modo ('push' o 'add'), lo pasamos como opcion del generateHtml
		  options = {
			pushData: this.pushList,
			mode: s_mode
			};
	  }
	  // no nos especifican modo de volcar datos, cargamos por defecto
	  else {
		  options = {
            pushData: this.pushList
		  	};
	  }
	  
	  this.generateHtml(options);
        
		// anyadimos el category | subcategory
		this.setCurrentTitle();
        
        // si existen parcelados
        if (this.b_Installments) {
            this.showInstallments();
        }
        
        // cuando recargamos, hemos de tratar de nuevos img, links y inputs
        if (!this.b_initialLoad) {
            this.setExtraInputs();
            this.setExtraImg();
            this.setExtraLinks();
        }
        
        // transicion visual
	  if(s_mode != 'add') {
        $(this.idCategoryData).appear({
            duration: 0.4
        });
	  }
        
        // actualizamos num productos
        this.updateNumProducts();
	
	  // comprueba si hay mas productos que mostrar, para mostrar el boton o no
	  this.checkMoreProducts();
    },
    
    /**
     * Reset de los contadores de productos renderizados
     */
    resetProductsCounter: function(){
        // reset de los productos renderizados
        this.i_prodRendered = 0;
        // reset del total de productos renderizados
        this.dgrid.i_totalProd = 0;
    },
    
    /**
     * Filtrado de Tallas - Resetea los checkboxes de seleccion de tallas
     * @param {Object} button - boton de reseteo
     */
    resetSizeFilter: function(button){
        //Reseteamos Items
        if ($(this.idSizeFilter) !== null) {
            $(this.idSizeFilter).reset();
        }
        //vaciamos el array de tallas
        this.filter.v_sizes.clear();
        // reiniciamos el label
        //this._updateLabelSizeFilter();
    },
    
    /**
     * Obtiene la coordenada Y del enlace de ver mas productos.
     * Necesitaremos este dato para la carga incremental automatica
     */
    setPositionBtnSeeMoreProds: function () {
    	this.seeMore.posY = $(this.seeMore.id).cumulativeOffset().top;
    },
  	  
	/**
	 * Marcos - Deprecated?
	 */
	seeMoreProducts: function() {
		this.nextPage();
  	},
  
    /**
     * Seleccion de vistas pasandole la id seteamos el numero de productos a mostrar y preparamos la pagina para mostrarlos
     */
    selectView: function(id){
        //nos guardamos la id para poder recuperar posteriormente
        this.id_view = id;
        this.updateUrl();
        if (id !== null) {
            // reseteamos paginador
            this.resetPager();
            
            this.setMaxItems(id);
            this.setViewCss(id);
            this.renderGrid();
            
            // inicializar paginador
            this.initPager('pager', this.dgrid.i_totalProd, this.getNumView());
            this.checkMoreProducts();
        }
    },
    
  
  /**
   * Seteamos el category | subcategory
   */
  setCurrentTitle: function(){
		if (this.getResData().breadcrumb_data && this.getResData().category_data){
	  	// obtenemos el nombre de la categoria del breadcrumb
		if(this.getResData().breadcrumb_data[1].bread_name){
			var s_campaign_name = this.getResData().breadcrumb_data[1].bread_name;
		}
		
		//obtenemos la subcategoria del data
		if(this.getResData().category_data.category_name){
			var s_campaign_subcategory = this.getResData().category_data.category_name;
		}
		
		// si son iguales es que no hay subcategoria
		if(s_campaign_name == s_campaign_subcategory){
			var titleCategory = this.buildTitle(s_campaign_name.capitalize(),'');
		}else{
			//anyadimos el separador
			s_campaign_subcategory = '| '+s_campaign_subcategory;
			var titleCategory = this.buildTitle(s_campaign_name.capitalize(),s_campaign_subcategory.capitalize());
		}
		
		$(this.idCurrentTitle).innerHTML = titleCategory;
		}
  },
  
  
    /**
     * Seteamos numero maximo de productos a mostrar
     */
    setMaxItems: function(id){
        if (this.v_maxItems[id] !== undefined) {
            this.dgrid.i_maxItems = this.v_maxItems[id];
        }
    },
    
    /**
     * Seteamos numero maximo de productos a mostrar 
     */
    setMaxItemsPerView: function(numLines){
        this.numeLines = numLines;
        this.v_maxItems['firstView'] = numLines * this.v_itemsPerLine['firstView']; // num de items a mostrar en la primera vista
        this.v_maxItems['secondView'] = numLines * this.v_itemsPerLine['secondView']; // num de items a mostrar en la primera segunda
        this.v_maxItems['thirdView'] = numLines * this.v_itemsPerLine['thirdView']; // num de items a mostrar en la primera tercera
    },
    
    /**
     * Prepara la pagina para mostrar correctamente la vista escogida
     */
    setViewCss: function(id){
        var views = $$('#select-view a');
        views.each(function(item){
            if ($(item).hasClassName('active')) {
                $(item).removeClassName('active');
            }
        });
        $(id).addClassName('active');
        $(this.idGridView).className = '';
        $(this.idGridView).addClassName(id);
    },

    
    /**
     * Filtrado de Tallas - Gestiona la seleccion de tallas mediante los checkboxes
     * Marcos - Deprecated?
     */
    sizeSelectionOLD: function(checkbox, availableProducts){
        // asignamos formato a las checbox pulsadas
        var sizeSelector = "span." + checkbox.id;
        // recogemos el total de checkboxes seleccionadas
        var v_sizeAdsMsg = $$(sizeSelector);
        
        // asignamos formato a las divs
        var sizeBoxSelector = "div." + checkbox.id;
        // recogemos el total de divs marcadas por tallas
        var v_sizeAds = $$(sizeBoxSelector);
        
        // si existe alguna checkbox seleccionada
        if ($F(checkbox) !== null) {
            // recogemos el total de productos
            var products = $$('.productlist');
            products.each(function(item){
                // si no estan marcados por talla los ocultamos
                if (!item.hasClassName('selected-1')) {
                    item.addClassName("hidden");
                }
            });
            
            //$$('productlist').invoke('removeClassName', 'selected-1');
            
            //Actualizamos la visualizacion de los productos
            // por cada div marcada con talla
            v_sizeAds.each(function(item){
                if (item.hasClassName('selected-1')) { // si tiene
                    // restamos contador
                    this.i_checkedSizes--;
                    // Actualizacion (resta) de la clase selected y oculta producto
                    this.removeSelected2(item);
                }
                else { // si no tiene
                    // sumamos contador
                    this.i_checkedSizes++;
                    // Actualizacion (suma) de la clase selected y muestra producto
                    this.addSelected2(item);
                }
            }, this);
            
            //Mostramos los mensajes de talla en cada producto
            v_sizeAdsMsg.each(function(item){
                item.show();
            });
        }
        else {
            $$('.productlist').invoke('removeClassName', 'selected-1');
            $$('.productlist').invoke('removeClassName', 'hidden');
        }
    },
    
    /**
     * Filtrado de Tallas - Gestiona la seleccion de tallas mediante los checkboxes
     * @param {Object} checkbox - talla pulsada por el usuario
     * Marcos - Deprecated? 
     */
    sizeSelection: function(checkbox, availableProducts){
        // asignamos formato a las checbox pulsadas
        var sizeSelector = "span." + checkbox.id; // size0 por ejemplo
        // recogemos el total de checkboxes seleccionadas
        var v_sizeAdsMsg = $$(sizeSelector);
        
        // asignamos formato a las divs
        var sizeBoxSelector = "div." + checkbox.id;
        var v_sizeAds = $$(sizeBoxSelector); // divs con size0
        //Mostramos los carteles
        if ($F(checkbox) !== null) {
            //Actualizamos la visualizacion de los carteles
            v_sizeAds.each(function(item){ // por cada div con size0
                this.addSelected(item);
            }, this);
            
            //Actualizamos el cartelito con el contador de productos
            //this.addProduct(availableProducts);
            
            //Mostramos los mensajes de talla en cada cartel
            v_sizeAdsMsg.each(function(item){
                item.show();
            });
            
            //Mostramos el boton de borrado
            if ($(this.idFilterButton) !== null) {
                $(this.idFilterButton).show();
            }
            
            //Ocultamos los carteles
        } else {
            //Actualizamos la visualizacion de los carteles
            v_sizeAds.each(function(item){
                this.subtractSelected(item);
            }, this);
            
            //Actualizamos el cartelito con el contador de productos
            //this.subtractProduct(availableProducts);
            
            //Ocultamos el mensaje de talla del cartel
            v_sizeAdsMsg.each(function(item){
                item.hide();
            });
        }
    },
    
    /**
     * Acciones a realizar cuando se selecciona una talla del combo del filtro de tallas
     * @param {Object} size_name
     * @param {Object} id
     */
    sizeSelectionHide: function(size_name, id){
        // guardamos filtro tallas
        this.setFilterSize(size_name, id);
        
        // actualizamos lista
        this._dirty = true;
        this.updateUrl();
    },
    
    /**
     * Filtrado de Tallas - Resta productos al total de disponibles para cada talla y muestra el mensaje correspondiente
     * @param {Object} i_availability - numero de productos a restar
     * Marcos - Deprecated?
     */
    subtractProduct: function(i_availability){
        this.i_sizeFilterCounter -= i_availability;
        var s_msgCounter = '';
        
        if (this.i_sizeFilterCounter > 0) {
            if (this.i_sizeFilterCounter == 1) {
                s_msgCounter = this.v_availabilityText[0];
            } else {
                s_msgCounter = this.v_availabilityText[1] + this.i_sizeFilterCounter + this.v_availabilityText[2];
            }
            $(this.idSizeFilterTxt).update(s_msgCounter);
        } else {
            $(this.idSizeFilterTxt).hide();
        }
    },
    
    /**
     * Filtrado de tallas - Actualizacion (resta) de la clase selected
     * @param {Object} item - chekbox marcado por el usuario
     * Marcos - Deprecated?
     */
    subtractSelected: function(item){
        //Obtenemos la lista de clases del objeto
        var v_AdClasses = $w(item.className);
        
        //Obtenemos la clase original
        var s_originalClass = v_AdClasses.detect(this._beginsWithSelected.bind(this));
        
        //Obtenemos el nuevo numero de la clase restando al original
        var s_newClassNumber = s_originalClass.substring(9, 11);
        s_newClassNumber--;
        
        //Si es cero, ocultamos
        if (s_newClassNumber == 0) {
            item.removeClassName("selected-1");
            item.addClassName("hidden");
        } else {
            //Asignamos la nueva clase previa eliminacion de la anterior
            var s_newClass = s_originalClass.substring(0, 9).toLowerCase() + s_newClassNumber;
            
            item.removeClassName(s_originalClass);
            item.addClassName(s_newClass);
        }
    },
    
    /**
     * recogemos la ruta de la imagen de campanya y la volcamos en la imagen
     */
    setCampaignImage: function(){
        if (this.getResData().category_data.category_image !== undefined) {
            this.s_campaignImg = (this.getResData().category_data.category_image);
            
            if ($(this.idBrandCampaign) !== null) {
                $(this.idBrandCampaign).writeAttribute("src", this.s_campaignImg);
            }
        }
    },
    
	/**
     * Comprueba si se esta filtrando por talla para agregarle a la URL el param Talla filtrado
     */
    setUrl: function(url) {
    	
    	var sizeFiltered = '', sSize = '', sUrlproductsize = url;
    	if(url != '') {
    		// antes, miramos si la URL ya tiene el param Size, para limpiarlo
    		var v_tmp = url.split('/size/');
    		if(v_tmp.size() > 1) {
    			url = v_tmp[0];
    		}
    		
    		// comprobar si se esta filtrando por talla
    		if(this.filter.v_sizes.size() > 0) {
    			sizeFiltered = encodeURIComponent(encodeURIComponent(this.filter.v_sizes[0]));
    			if(sizeFiltered != '') {
    				// le agregamos a la URL del detalle de producto, el param de la talla
    				//url += '/size/' + sizeFiltered.toLowerCase();
    				url += '/size/' + sizeFiltered;
    			}
    		}
    		//arrastrar al detalle del producto la url con la talla cuando el combo solo tiene una talla, es decir que esta seleccionada
    		if (sUrlproductsize.indexOf("/size") > 1) {
    			var v_tmp = sUrlproductsize.split('/size/');
        		if(v_tmp.size() > 1) {
        			sUrlproductsize = v_tmp[0];
        			sSize = v_tmp[1];
        		}
    			url = sUrlproductsize + '/size/' + sSize;
    		}
    	}
    	
    	return url;
    },
    
	/**
	 * Devuelve el texto "Talla unica"
	 */
    showTxtUniqueSize: function(){
    	return this.getTxt("uniquesize");
    },
    	
    /**
     * actualizamos num productos
     */
    updateNumProducts: function(){
        if ($('productsFiltered') !== null) {
            $('productsFiltered').update(this.dgrid.i_totalProd);
        }
        if ($('productsFilteredContainer') !== null) {
            $('productsFilteredContainer').appear();
        }
    },
    
    /**
     * Volcamos todos los productos de la subcategoria
     */
    _addProductsOfSubcategory: function(v_products){
		var i = 0, // contador para los productos de la subcategoria 
		j = 0, // contador para los productos disponibles en la talla seleccionada
		i_maxProducts = v_products.size(), // volcamos la cantidad total de productos
		v_pks = []; // aquí guardaremos los productos filtrados para almacenarlos en una cookie
		
        
        while (i < i_maxProducts) {
            // volcamos los productos en el objeto dataJson
            var dataJson = v_products[i];
            
            // filtrar por talla
            if (this.checkProductHasSizes(dataJson)) {
            	v_pks[j] = [dataJson.product_PK, parseInt(this.getUrlParamValue('category', dataJson.detail_url))];
            	
                // si se esta filtrando por talla, hay que agregar a la URL
                dataJson.detail_url = this.setUrl(dataJson.detail_url);
                
                //construye y muestra u oculta el select de las tallas
                dataJson = this.buildSelectSize(dataJson);
                
               if ( dataJson.urlproduct != undefined && dataJson.productsize != undefined ){
            	   dataUrlProductSize = dataJson.urlproduct+'/size/'+encodeURIComponent(encodeURIComponent(dataJson.productsize));
            	   dataJson.detail_url = this.setUrl(dataUrlProductSize);
               }
                //Disponibilidad en Listado de Productos
                if (!Object.isUndefined(dataJson.product_quantityAvailable)) {
                    dataJson.product_quantityAvailableTxt = this.getAvailability(dataJson.product_quantityAvailable);
                    dataJson.product_quantityAvailableStyle = this.getAvailabilityStyle(dataJson.product_quantityAvailable);                    
                }
                
                // Averigua si hay que introducir un clear segun la posicion del producto en el listado
                // segun la vista en la que estamos
                dataJson.clearing = this.getClearing(this.dgrid.i_totalProd, this.getNumView());
                
                // anyadimos clase alpha a los primeros elementos de la fila en el listado
                dataJson.alpha = this.getAlpha(this.dgrid.i_totalProd, this.getNumView());
                
                if (this.sizeFilterAvailable == 1 && Country.getSizeFiltering()) {
                    // Logica para asignar clases segun disponibilidad de tallas
                    //dataJson.size_classes = this.getSizeClasses(dataJson.product_sizes);
                    // Logica para escribir las clases correspondientes a las tallas
                    dataJson.size_names = this.getSizeNames(dataJson.product_sizes);
                }
                
                // Parcelados
                if (dataJson.product_available_installments && dataJson.product_available_installments !== '0') {
                    // flag para saber que hay parcelados
                    this.b_Installments = true;
                    // volcamos el multiplicador y el importe en una variable json
                    dataJson.result_installments = dataJson.product_available_installments + "x " + dataJson.product_price_with_installments;
                }
                
                // sumo datos a volcar
                this.addBuiltProduct(dataJson);
                j++;
            }
            i++;
            this.s_categoryTitle = '';
        }
        // almacenar filtrado (en localStorage si está disponible, en una cookie sino)
        var s_pks = Object.toJSON(v_pks);
        if (window.localStorage) {
        	localStorage['filter_result'] = s_pks;
        } else {
        	Cookies.set('filter_result', s_pks, 1, "/");
        }
    },
    
    
    /**
     * Filtrado de Tallas - Detecta la aparicion de una cadena que empieza con "selected-"
     * @param {Object} str - cadena a analizar
     */
    _beginsWithSelected: function(str){
        var first = str.substring(0, 9).toLowerCase();
        return first == "selected-";
    },
    
    /**
     * Tratamos el label de filtro de tallas
     * TODO: Deprecated - En estos momentos no se han de actualizar los valores
     */
    _updateLabelSizeFilter: function(size_name){
        var idSizeLabel = this.idFilterSizeMenu + '_label';
        
        if (Object.isArray(this.filter.v_sizes) && this.filter.v_sizes.length > 0) {
			$(idSizeLabel).update(size_name);
        }
        else {
            $(idSizeLabel).update(this.getTxt('allSizes'));
        }
    }
});

/**
 * PrivaliaMicrositesShopwindow - Common
 * =========================================
 * @modified: 	Cristina		(28-06-11)
 */
var PrivaliaMicrositesShopwindow = Class.create(PrivaliaMicrositesJsonShopwindow, {
    initialize: function($super){
        $super();
        this.idGridView = 'gridView'; //id contenedor de productos
        this.btnAdd = 'button-container'; //id del boton anadir
        this.idUrlProduct = 'js-urlproduct';			//id donde se vuelca la url del producto
        this.idUrlProductSize = 'js-urlproductsize';	//id donde se vuelca la url del producto + size
		
	this.idmenuFlow = 'menuFlow'; 		// id del menu flotante de la izquierda
	// cargar valor inicial de view desde la URL
	var view = this.getUrlParamValue('view', this.getUrl());
    	if (view) {
    		this.id_view = view;
    	}
        //version
        this.version = 3.0;
        this.setVersion(this.version, 'PrivaliaMicrositesShopwindow');
    },
    
    /**
     * Se monta la url que hara el getData segun los filtros establecidos
     */
    getUrlFilter: function(){
        var url = '';
        //  Montamos la url con los datos json segun la categoria y orden solicitados
        if (this.filter.i_order != 0) {
            url = "/microsites/getCategoryProductsData/campaign/" + this.getCampaign() + "/category/" + this.filter.i_cat + "/order/" + this.filter.i_order;
        }
        //  Montamos la url con los datos json segun la categoria solicitada
        else {
            url = "/microsites/getCategoryProductsData/campaign/" + this.getCampaign() + "/category/" + this.filter.i_cat;
        }
        return url;
    },
    		




	
	
	
	
    /**
     * actualizamos la categoria
     */
    setFilterCategory: function(category){
        if (category != '' && Object.isNumber(category)) {
            this.filter.i_cat = category;
        }
    },
    
    /**
     * actualizamos el orden
     */
    setFilterOrder: function(order){
        if (order != '' && (order == '1' || order == '2' || order == '3')) {
            this.filter.i_order = order;
        }
    },
    
    /**
     * Seteamos el contenido del array de tallas en funcion de la talla seleccionada
     * @param {Object} size - string de la talla
     * @param {Object} id - id de la talla seleccionada
     */
    setFilterSize: function(size, id){
		if(id == 'all-sizes'){
			 //vaciamos el array de tallas
        	this.filter.v_sizes.clear();
		}else{
			// Utilizamos simplemente el primer elemento del array
			this.filter.v_sizes[0] = size;
		}
    },
    
    /**
     * Incluye pagina vista virtual a google analytics
     */
    setPageView: function(category){
        var campaignId = this.getUrlParamValue('campaign');
        //si existe camapignId, category y el objeto google analytics hace la llamada
        if (campaignId != '' && campaignId != null && category != '' && category != null && _gaq) {
            _gaq.push(['_trackPageview', '/microsites/shopwindow/campaign/' + campaignId + '/category/' + category]);
        }
    },
    getUrlProduct: function (sForm, sValue, sProduct){
    	 var campaignId = this.getUrlParamValue('campaign'),
    	 category = this.getUrlParamValue('category'),
    	 s_Product = sProduct.split('-')[2],
	 sUrl = '',
    	 sLabel = $(sProduct).options[$(sProduct).selectedIndex].text;   	 
    	 if( s_Product != '' ) {
    		 if ( sLabel != '' ){ 
    			 sUrl = '/microsites/fittingroom/campaign/' + campaignId + '/category/' + category + '/product/' + s_Product + '/size/' + sLabel;
    		 }
    	 }
    	 else {
    		 sUrl = '/microsites/fittingroom/campaign/' + campaignId + '/category/' + category + '/size/' + sLabel;
    	 }
    	 return sUrl;
    },
    
    /**
     * Construir la url con la talla
     *       
     */
    transferUrl: function(sIdSelect){    	
    	var sUrlProduct,
    	sSizeSelected,
    	sClearLabel,
    	nOptionSelected = $(sIdSelect).selectedIndex;
    	if ( $(this.idUrlProduct) != null ) {
    		sUrlProduct = $(this.idUrlProduct).innerHTML;
    	}
    	sSizeSelected = $(sIdSelect).options[nOptionSelected].text;    	
    	sClearLabel = this.trim(sSizeSelected.split('--')[0]);
    	sUrlProduct = sUrlProduct + '/size/' + encodeURIComponent(encodeURIComponent(sClearLabel));
    	
    	return sUrlProduct;
    },
    /**
     * Accion: onchange.
     * Obtener url del producto con la talla y poder arrastrarla al detalle del producto como seleccionada.
     */
    getUrlProductSize: function (sId){
		//obtener url y anyadir talla
		var sUrl = this.transferUrl(sId);
		//sobreescribir la url 
		if (sUrl != ''){
			var oFather = $(sId).getOffsetParent(),
			aChildrens = oFather.childElements();
			if ( (!Object.isUndefined(oFather)) && (!Object.isUndefined(aChildrens)) ){
			 	for (var i = 1; i < aChildrens.length; i++){
			 		var aSon = aChildrens[i].descendants();
			 		for (var j = 0; j < aSon.length; j++) {
			 			var sAttribute = $(aSon[j]);
			    		if ( sAttribute.hasAttribute('href') && (sAttribute.hasClassName(this.idUrlProductSize)) ){
			    			sAttribute.href = sUrl;
			    		}
			 		}
			 	}
			}
        }
    },
    
    /**
     * Detalle de Producto - Habilita el boton de anadir a carrito.
     * Si detecta que la seleccion de cantidad es vacia, deshabilitar el boton
     */
    showListAddButton: function(form, value){
        var sufix = form.split("_")[1], 
        idBtnAdd = this.btnAdd + '_' + sufix;
        
        if ($(idBtnAdd) !== null) {
            if ($(idBtnAdd).hasClassName('disableButton')) {
                $(idBtnAdd).removeClassName('disableButton');
            }
            //TODO: falta controlar que al seleccior de nuevo "seleccionar talla" se desactive el boton
		    else if(value == ""){
                    $(idBtnAdd).addClassName('disableButton');
                }
        }
    },
    
    /**
     * Grabamos la nueva categoria y actualizamos el datagrid de productos
     */
    updateCategory: function(category){
        this.resetSizeFilter();
        if (category != this.filter.i_cat) {
	    	// asignamos pagina vista en google analytics
			this.setPageView(category);
		}
        this.setFilterCategory(category);
        /* MODIFICACION REALIZADA POR NAIARA (30/05/2011)
         * Resetear orden en la vista con menu lateral
         */
        if($('filterCategory') == null){ //TODO:quitar esta condicion si se queda el menú lateral
        	this.setFilterOrder(1);
        }
        // FIN MODIFICACION NAIARA
        this._dirty = true;
        this.updateUrl();
        
        return false;
    },
    
    /**
     * Grabamos el nuevo orden y actualizamos el datagrid de productos
     */
    updateOrder: function(order){
        this.setFilterOrder(order);
	    this._dirty = true;
        this.updateUrl();
    },
	
	/**
	 * Establecer todos los filtros de una vez
	 * @param {Object} filters - Objeto con, opcionalmente, las siguientes propiedades: order, category, size y view
	 */
	setAllFilters: function(filters) {
    	category = parseInt(filters.category);
    	order = parseInt(filters.order) || 1;
    	size = filters.size;
    	view = filters.view || this.dgrid.s_defaultView;
    	if (order != this.filter.i_order || category != this.filter.i_cat) {
    		this._dirty = true;
    	}
    	if (category != this.filter.i_cat) {
	    	// asignamos pagina vista en google analytics
			this.setPageView(category);
		}
		this.setFilterCategory(category);
		this.setFilterOrder(order);
		if (decodeURIComponent(size) != this.filter.v_sizes[0]) {
			this._dirty = true;
		}
		if (size) {
			this.setFilterSize(decodeURIComponent(size));
		} else {
			this.resetSizeFilter();
		}		
		if (this.id_view != view) {
			this.selectView(view);
		}
		if (this._dirty) {
			this._dirty = false;
        	this.updateList();
		}
        this._scrollToDiv('breadcrumb');
    },
    
    /**
     * Actualiza el listado de productos (datagrid) segun los parametros de filtrado que ha guardado en memoria
     */
    updateList: function(){
        $('productsFilteredContainer').fade({
            from: 1,
            to: 0.3,
            duration: 0.2
        });
        
        // reseteamos paginacion a 1
        this.setPage(1);
        // pasamos los valores para montar la url que nos pasara los productos
        var url = this.getUrlFilter();
        // pasamos la nueva url
        this.setUrlGetData(url);
        // actualizamos el listado de productos
        this.reload();
    },
	
	/**
	 * Actualiza la URL con los parámetros del filtrado
	 */
	updateUrl: function() {
    	var url = "#category/" + this.filter.i_cat;
    	if (this.filter.i_order > 1) {
			url += "/order/" + this.filter.i_order;
    	}
    	if (this.filter.v_sizes.length > 0) {
    		url += "/size/" + encodeURIComponent(encodeURIComponent(this.filter.v_sizes[0])); // codificar dos veces para evitar problemas con las "/" en apache
    	}
    	if (this.id_view && this.id_view != this.dgrid.s_defaultView && this.id_view != 'undefined') {
    		url += "/view/" + encodeURIComponent(this.id_view);
    	}
    	location.href = url;
	},

	/**
	 * Dado el array de tallas devuelto por el backend construye un mapa
	 * de la talla al ID de su elemento correspondiente en el menú de tallas
	 */
	buildSizeIdMap: function(sizes) {
		this._sizeIdMap = {};
		this._sizeIdMap[this.getTxt('allSizes')] = 'all-sizes';
		if (sizes) {
			for (var i=0; i < sizes.length; i++) {
				var size = sizes[i];
				this._sizeIdMap[size.prodf_websize] = 'size-' + size.size_class;
			}
		}
	},
	
	/**
	 * Dada una talla, devuelve el ID del elemento de la talla en el menú de tallas.
	 */
	getSizeIdByValue: function(size) {
    	if (this._sizeIdMap) {
    		return this._sizeIdMap[size];
    	} else {
    		return false;
    	}
    },
    
    /**
     * Añade o reemplaza el parámetro view en la URL dada, poniéndole la vista actual (o ninguna si la vista actual es la vista por defecto)
     * @param {String} url - La URL a modificar
     * @return {String} La URL modificada
     */
    setCurrentViewInUrl: function(url) {
    	url = url.replace(/\/view\/[^\/]*/ig, ''); // quitar el parámetro view de la url, si existe
    	if (this.id_view && this.id_view != this.dgrid.s_defaultView) {
    		// si hay un id_view y es distinto al default, añadirlo a la URL
    		url += '/view/' + this.id_view;
    	}
    	return url;
    },
    
    /**
     * Hace scroll al id pasado como parametro. El efecto Scroll esta ya definido.
     */
    _scrollToDiv: function(divId){
    	Effect.ScrollTo(divId, {
            duration: 1
          });
    }
});
/**
 *  privalia.myaccount.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 90-privalia.base.js
 * @revision: 	1.0
 */

/**
 * PrivaliaJsonMyaccount - Common
 * =========================================
 * @modified: 	Dani	(29-03-11)
 */
var PrivaliaJsonMyaccount = Class.create(PrivaliaTrackingStatus, {
    initialize: function($super){
        $super();

        this.errId = '23';
        this.statusVouchers = [];
        this.v_typeOrderTxt = [];
        this.v_typeAgentTxt = [];
        this.s_changeSizeHTML = '';
        this.changeAddressOpened = false;
        this.changeSizeOpened = false;

        this.code_statusOpen = '1'; // abierto
        this.code_statusCancel = '1-1'; // cancelado
        this.code_statusOutSupplier = '2'; // pendiente de marca
        this.code_statusInWarehouse = '3'; // en almacen
        this.code_statusDelivering = '4'; // en reparto
        this.code_statusDelivered = '6'; // entregado
        this.code_statusOutSupplierConfirmed =	'20';			// pendiente de marca y confirmado - el 20 corresponde al codigo que utiliza IT(ordstatus_PK)
        this.v_code_statusReturns = ['0','6-1','6-2','6-3','6-4']; // devolucion en curso

        this.i_carrier = 						'';				// integer que identifica al operador logisitico

        //version
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaJsonMyaccount');
    },

    /**
     * Construye la pagina con los datos pasados por json previamente
     */
    buildPage: function(generate){
        switch (generate) {
            case 'change_address':
                this.generateHtml();
                this._orderRadioManagement();
                break;

            case 'vouchers':
                this.generateHtml({
                    pushData: this.pushVouchers
                });
                //Comprobamos si tiene descuentos
                this.setVouchersPromotions();
                break;

            case 'view_bill':
                this.generateHtml({
                    pushData: this.pushBills
                });
				this.updateBillHeader();
				Cufon.replace('#view_bill_pk');
                break;

            case 'order_list':
                this.generateHtml({
                    pushData: this.pushOrderList
                });
                break;

            case 'order_status':
                this.generateHtml({
                    pushData: this.pushTrackingStatus
                });

			    // Dependiendo del estado en el que se encuentre el pedido se oculta/muestra funcionalidades
				dataBanners = this.getResData().order_actions;
				this.setBanners(dataBanners);
			    this.setTracking(this.getStatusTracking());

                // aplica el sprite segun el tipo de carrier
            	this.setStatusCarrier();
            	// Almacena el numero de order
                var order_PK = this.getOrderPK();

                var data = this.getResData();
                // Asigna a las clases orderPK el numero de order
                $$('input.orderPK').invoke('setValue', order_PK);
                // Guardamos el tipo de proveedor para distinguir trackings de servicios
    			this.i_carrier = this.getResData().ordstatus_carrier;
    			// Guarda el integer que indica si el pedido es un servicio
    			this.i_service = this.getResData().campaign_data.campaign_product_types.service;
                // Aplicar tooltip a thumbnails de productos para ver ampliado
				this.setThumbnailTooltip();
				//Comprovamos si tiene descuentos
				this.setOrderviewDiscountPromo();

                // comprueba que la venta de servicios este activa para el pais
				if (Country.getService()){
					var Service = new PrivaliaSellingServices(this.getResData(), 'orderview');
					// comprobamos el flag para mostrar el boton de cancelar
					Service.checkCancelButton(this);
					// en caso de pedido en confirmacion, eliminamos la opcion de reabrir pedido
					Service.checkPendingOrder(this);
				}

				if (Country.getLogisticCarrier()){
					// si el valor es true
					if(KialaData.kialaIsAvailable(data)){
						// obtenemos la url de datos
						KialaData.getData('/kiala/getConnectionURL','kiala');

					}
				}
                break;
            case 'profile':
            	this.generateHtml()
            	this.putValuesInputIE();
            	break;
            default:
                this.generateHtml();
        }
    },

    /**
     * Abre el modal de cambiar direccion de envio
     */
    changeAddress: function(PJson, modal){
        othis = this;
        //	Si es posible, abrimos la modal
        if (!$('address-edit').hasClassName('disableButton')) {
	        if (!this.changeAddressOpened) {
	                // cargar datos del formulario
	                PJson.getData('/myaccount/getUserAddresses', 'change_address');
	                this.changeAddressOpened = true;
	        }
	        modal.open();
        }
    },

    /** deshabilitar editar direccion   */
    disableAddressEdit: function(){
		if($('address-edit')!== null){
	        $('address-edit').addClassName('disableButton');
		}
    },

    /** deshabilitar cambiar talla	 */
    disableChangeSize: function(){
		if ( $('change-size') !== null) {
	        $('change-size').addClassName('disableButton');
		}
    },

    /** deshabilitar anyadir productos	 */
    disableOrderExpand: function(){
		if($('order-expand')!== null){
	        $('order-expand').addClassName('disableButton');
		}
    },

	/** deshabilitar el boton de imprimir voucher	*/
	disablePrintVoucher: function(){
		if($('printBillBanner')!== null ){
			$('printBillBanner').addClassName('disableButton');
		}
		if($('btnPrint')!== null){
			$('btnPrint').addClassName('disableButton');
		}
	},

    /**
     * Mostrar combo cambiar talla en la modal
     */
    enableComboChangeSize: function(clicked){
        //Buscamos todos los elementos para cada producto del pedido
        var idForm = 'changeSize';
        var v_radios = $(idForm).getInputs('radio');
        //Los reseteamos
        v_radios.each(function(item){
            item.checked = false;
            var stock_pk = item.className;

            var idComboQ = "product[" + stock_pk + "][new_stockp_PK]";
            var idComboS = "product[" + stock_pk + "][quantity]";
            var idOriginalQuantity = stock_pk + "_original_quantity";
            var idOriginalPrice = stock_pk + "_original_size";

            $(idComboQ).addClassName('hidden');
            $(idComboS).addClassName('hidden');
            $(idOriginalQuantity).removeClassName('hidden');
            $(idOriginalPrice).removeClassName('hidden');
        });

        //Mostramos los combos
        clicked.checked = true;
        var idComboQ = "product[" + clicked.className + "][new_stockp_PK]";
        var idComboS = "product[" + clicked.className + "][quantity]";

        var idOriginalQuantity = clicked.className + "_original_quantity";
        var idOriginalPrice = clicked.className + "_original_size";

        $(idComboQ).toggleClassName('hidden');
        $(idComboS).toggleClassName('hidden');

        $(idOriginalQuantity).toggleClassName('hidden');
        $(idOriginalPrice).toggleClassName('hidden');

        $('buttonChangeSize').removeClassName('hidden');
    },

    /**
     * Mostrar boton cambiar talla en la modal
     */
    enableModalChangeSize: function(){
    	if($('btnCambiar')!== null){
        	$('btnCambiar').removeClassName('hidden');
        }
    },

    /**
     * Obtener la url de la campanya a la que pertenece el producto
     */
    getCampaignURL: function(){
        return this.getResData().order_data.campaign_url;
    },

    /**
     * Obtener el numero de order
     */
    getOrderPK: function(){
        return this.getResData().order_data.order_PK;
    },

    /**
     * Obtener detalles de pedido en modal de cambiar talla (volcado recuperando datos ya cargados)
     */
    getSizeChangeInfo: function(modal){
        //	Si es posible, abrimos la modal
        if (!$('change-size').hasClassName('disableButton')) {
                var built = '';
                var obj = '';
                var html = '';
                var idChangeSize = "order_products2";
                var html = this.s_changeSizeHTML;

                //Comprobamos si esta definido el template
            if (html == '' && !this.changeSizeOpened) {
                    html = $(idChangeSize).innerHTML;
				this.s_changeSizeHTML =  html;
            }else{
				html = this.s_changeSizeHTML;
                }
                //Obtengo los datos de las variables
                obj = this.getResData().order_products;
                //recupero el html a rellenar y creo el template
                var tpl = new Template(html);
                //vamos sustituyendo las variables dentro del template
                obj.each(function(item){

                    //Select de la cantidad
                    quantity = this.feedSelectQuantity(item.ordline_quantityOrdered, item.ordline_FK_stockp_PK);
                    item.select_return_quantity = '<select id="product[' + item.ordline_FK_stockp_PK + '][quantity]" class="hidden" name="product[' + item.ordline_FK_stockp_PK + '][quantity]">' + quantity + '</select>';

                    //Carga el select de las tallas disponibles
                    options = this.feedSelectSize(item.prodf_availables, item.ordline_PK);
                    item.select_ordline_sizes = '<select id="product[' + item.ordline_FK_stockp_PK + '][new_stockp_PK]" name="product[' + item.ordline_FK_stockp_PK + '][new_stockp_PK]]" class="hidden">' + options + '</select>';

                    built += tpl.evaluate(item);
                }, this);

                //actualizamos el aspecto del bloque en la web
                $(idChangeSize).update('');
                $(idChangeSize).update(built);

			//marcamos la modal como ya utilizada y la abrimos
                this.changeSizeOpened = true;

            modal.open();
        }
    },

    /**
     *  Oculta boton de cancelar pedido
     */
    hideActionBanners: function(){
		if($(this.idBanners)!== null){
	        $(this.idBanners).addClassName('hidden');
		}
    },

    /**
     *  Oculta boton de cancelar pedido
     */
    hideButtonOrder: function(){
		if ($('btnCancelOrder') !== null) {
	        $('btnCancelOrder').hide();
		}
    },

    /**
     * Personalizacion del volcado para Estado de pedidos
     */
    pushTrackingStatus: function(dataJson, index){
        var target = this.getTarget();
        if (target == "order_payments") {
        	dataJson.authorisation_payment = "";
        	// contador del numero de pagos
			dataJson.payment_number = index + 1;
			// si no existe numero de autorizacion se oculta la div
			if(dataJson.response_authorisationcode == null){
				dataJson.authorisation_payment = 'hidden';
			}

        	switch (dataJson.ftransaction_type) {
            case 'sale':
            	dataJson.ftransaction_type = this.v_typeOrderTxt[0];
                break;
            case 'refund':
            	dataJson.ftransaction_type = this.v_typeOrderTxt[1];
                break;
        	}

        	// Si el pago se realiza con tpv cambia el copy indicando que se ha realizado el pago con Tarjeta de credito
        	// si por el contrario se ha realizado con paypal muestra el texto Paypal
        	switch (dataJson.ftransaction_agent) {
            case 'tpv':
            	dataJson.ftransaction_agent = this.v_typeAgentTxt[0];
                break;
            case 'tpv_braspag':
            	dataJson.ftransaction_agent = this.v_typeAgentTxt[0];
                break;
            case 'paypal':
            	dataJson.ftransaction_agent = this.v_typeAgentTxt[1];
                break;
        	}
        }
        if (target == "order_status") {
			//Pasamos valores: el tracking, si es servicio, el target y el objeto dataJson
			dataJson = this.setOrderStatus(dataJson.ordstatus_tracking, this.getResData().campaign_data.campaign_product_types.service, target, dataJson);
        }

        // sumo datos a volcar
        this.addBuilt(dataJson);
    },

    /**
     * Get Data personalizado para Ver Facturas
     */
    pushBills: function(dataJson, index){
        var target = this.getTarget();

		if (target == "invoices_data") {
			// asignamos un estado de factura segun su tipo
            switch (dataJson.bill_type) {
                case 'S':
                    dataJson.bill_type = this.vBillType["original"];
                    break;
                case 'R':
                    dataJson.bill_type = this.vBillType["rectified"];
                    break;
                case 'F':
                    dataJson.bill_type = this.vBillType["fraud"];
                    break;
                case 'N':
                    dataJson.bill_type = this.vBillType["creditnote"];
                    break;
                default:
                    break;
            }
			dataJson.pdf_link = "/myorder/getinvoice/id/" + dataJson.bill_PK;

			// comprobamos el flag para mostrar el boton de ver factura dentro del modal
			if (dataJson.bill_button_flag == '0') {
            	dataJson.viewPdfBill_class = 'hidden';
            }
			else{
				dataJson.viewPdfBill_class = '';
            }
        }

        // sumo datos a volcar
        this.addBuilt(dataJson);
    },

    /**
     * Get Data personalizado para Listado de Pedidos
     */
    pushOrderList: function(dataJson, index){
        var target = this.getTarget();

		if (target == "orders_data") {
			// En funcion del estado(ordstatus_tracking) del pedido mostramos una descripcion del estado
			// Al metodo que devuelve el estado, se le pasan los parametros de estado y variable que indica si el pedido es un servicio
			dataJson.ordstatus_description = this.setOrderStatusList(dataJson.ordstatus_tracking, dataJson.service_order);

			// asignamos un estado de factura segun su tipo
			dataJson.pdf_link = "/myorder/getinvoice/id/" + dataJson.bill_PK;
        }

        // sumo datos a volcar
        this.addBuilt(dataJson);
    },

    /**
     * Reemplaza el valor del estado del cheque por el texto definido
     */
    pushVouchers: function(dataJson, index){
        var target = this.getTarget();
        // Miramos si tienen condiciones
        if(dataJson.voucher_conditions && dataJson.voucher_conditions !== null){
        	dataJson.voucher_conditions = '<a href="javascript:void(0)" onclick="Data.toggleTooltip('+"'promo"+index+"'"+')" title="'+dataJson.voucher_description+'">'+dataJson.voucher_description+'</a><div id="promo'+index+'" style="display:none;"><br />'+dataJson.voucher_conditions+'</div>';
        }
        else{
        	dataJson.voucher_conditions = dataJson.voucher_description;
        }
        dataJson.voucher_status_txt = this.statusVouchers[dataJson.voucher_status];

        // sumo datos a volcar
        this.addBuilt(dataJson);
    },

    /**
     * Dependiendo de los flags que nos envien, activamos algunos banners o los botones de cancelar pedido
     */
    setBanners: function(data){
    	if (!data.cancel){
			this.hideButtonOrder();
		}
		if(!data.change_delivery_address){
			this.disableAddressEdit();
		}
		if(!data.edit_product){
			this.disableChangeSize();
		}
		if(data.print_service_voucher !== undefined){
			if(!data.print_service_voucher){
				this.disablePrintVoucher();
			}
		}
		if(!data.reopen){
			this.disableOrderExpand();
		}
    },

    /**
     * Dependiendo del estado en el que se encuentre el pedido oculta el tracking
     */
    setTracking: function(status_tracking){
        this.v_code_statusReturns.each(function(item){
    		// si coincide alguno de los valores eliminamos la parte del tracking
    		if(status_tracking == item){
    			$('order_status').remove();
    		}
    	},this);
    },

    /**
	 * Comprueba si tiene alguna promocion, mueve los datos al div container y muestra la linea correspondiente
	 */
	setOrderviewDiscountPromo: function(){
		if (this.hasDiscountPromo('orderview')){
			if($('discountPromo') !== null){
				$('discountPromo').removeClassName('hidden');
			}
		}
	},
	/**
	 * Comprueba si tiene alguna promocion, mueve los datos al div container y muestra la linea correspondiente
	 */
	setVouchersPromotions: function(){
		if (this.hasDiscountPromo('vouchers')){
			if($('promotions') !== null){
				$('promotions').removeClassName('hidden');
			}
		}
    },

    setStatusVouchersTxt: function(idState, txt){
        this.statusVouchers[idState] = txt;
    },

    /**
     *  Carga el copy correspondiente a tpv o paypal
     */
    setTypeAgentTxt: function (txtTpv, txtPaypal) {
    	this.v_typeAgentTxt[0] = txtTpv;
    	this.v_typeAgentTxt[1] = txtPaypal;
	},

    setTypeOrderTxt: function (txtSale, txtRefund) {
    	this.v_typeOrderTxt[0] = txtSale;
    	this.v_typeOrderTxt[1] = txtRefund;
	},

	/**
	 * TODO: Marcos - Replantear estas funciones
	 * Hacer un submit que recarge los datos de su objeto
	 * @param {Object} idForm - id del Formulario a enviar
	 */
	submitAndReload: function(idForm) {
		this.submit(idForm, this._submitAndReload.bind(this));
	},

	/**
	 * Hacer un submit que recarge los datos de su objeto
	 * @param {Object} response - respuesta del envio
	 */
	_submitAndReload: function (response) {
		this.stopTimeout();
		this.parseResponse(response);
		if(this.statusOK()) {
			// mostrar mensaje de notificacion
			this.notify(this.getResTextcodes());
			// refrescar la pagina
			this.reload();
		}else {
			this.endSubmitError();
		}
		this.stopLoad();
	},


	/**
	 * Actualiza la informacion de la cabecera de la seccion ver Factura
	 */
	updateBillHeader: function(){
		if($('view_bill_pk') !== null){
			$('view_bill_pk').update(this.getResData().order_data.order_PK);
		}
	},

    /**
     * Gestiona la seleccion de las direcciones de envio en modificar direccion de envio
     */
    _orderRadioManagement: function(){
        var idForm = 'edit-addresses-form';
        var v_buttons = $(idForm).getInputs('radio', 'memaddress_PK');
        var firstRadioBtn = v_buttons.first();

        //Seleccionar el primero de la lista
        firstRadioBtn.writeAttribute("checked", "checked");
    }

});


/**
 * PrivaliaMyaccount - Common
 * =========================================
 * @modified: 	Marcos	(21-06-11)
 */
var PrivaliaMyaccount = new Class.create(PrivaliaJsonMyaccount, {
    initialize: function($super){
        $super();
        this.idBanners =		'banners';			// div que engloba los banners de proceso: reabrir pedido, cambiar talla, etc.
        this.reasonSelected = 	'';
        this.s_cancelTxt = 		'';
        this.reasonSelected = '';
        this.vReasonStatus = 	[]; // Razon para cancelar pedido
        this.viewBillOpened = 	false;
        this.viewServiceBillOpened = false;
		this.vBillType =		[];

		 //version
	   	this.version =				1.1;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaMyaccount');

    },

    addActiveStatus: function(div){
        node = $(div);
        if (node.hasClassName("status0")) {
            node.addClassName("stat1");
        }
        else {
            node.removeClassName("stat");
        }
    },

    addInactiveStatus: function(div){
        node = $(div);
        if (node.hasClassName("status0")) {
            node.removeClassName("stat1");
        }
        else {
            node.addClassName("stat");
        }
    },

    /**
     * Abre el modal de cancelar el pedido
     */
    cancelCart: function(){
        modalCancelCart.open();
    },

    /** metodo para cancelar un pedido
     * dependiendo del option que se escoja muestra u oculta informacion determinada
     */
    cancelOrder: function(id){
        // Almaceno la razon seleccionada
        this.reasonSelected = id;

        // Cargar los textos correspondientes de la seccion
        txtBoxInfo = this.vReasonStatus[id]["boxinfo"];
        txtBtn = this.vReasonStatus[id]["btn"];
        this.loadCancelReasonTxt(txtBoxInfo, txtBtn);

        // Marcar la opcion seleccionada
        this.checkSelectedReason(id);
    },

    /**
     * Dependiendo la razon seleccionada se modifica el estilo del label y del boton
     */
    checkSelectedReason: function(id){
        switch (id) {
            case 'reason1':
                /* elimino clase bold de los demas labels y ...*/
                this._removeSelectedReason();
                /* activo label correspondiente */
                this._activeSelectedReason(id);
                /* elimino la clase red al boton */
                $('btnCancel').show().removeClassName('red');
                break;
            case 'reason2':
                this._removeSelectedReason();
                this._activeSelectedReason(id);
                $('btnCancel').show().addClassName('red');
                break;
            case 'reason3':
                this._removeSelectedReason();
                this._activeSelectedReason(id);
                $('btnCancel').show().removeClassName('red');
                break;
            case 'reason4':
                this._removeSelectedReason();
                this._activeSelectedReason(id);
                $('btnCancel').show().addClassName('red');
                break;
        }
    },

    /**
	 * Guarda en sesion el orderPK (id del pedido)
	 * y automaticamente redirige al detalle de pedido
	 */
	goToOrder: function(elem) {
    	var idpk = $(elem).title;
		if(idpk != '') {
			var url = '/myaccount/setorder/order/' + idpk;
			new Ajax.Request(url, {
				onComplete: this.redirectToOrderView.bind(this),

				onFailure: (function() {
					this.errorMessage('03');
				}).bind(this),
				onException: (function() {
					this.errorMessage('04');
				}).bind(this)
			});
		}
	},

    loadCancelReasonTxt: function(a, txtBtn){
		if($('txtRemember') !== null){
	        $('txtRemember').update(a);
		}
		if($('buttonCancelOrder')!== null){
	        $('buttonCancelOrder').update(txtBtn);
		}
    },


    /**
     * redirecciona a la home de campanya de ese producto
     */
    redirectToHomeCampaign: function(){
        var url = $F('campaign_url');
        document.location.href = URL_DOMAIN + url;
    },

	/**
	 * Fija los textos que han de mostrarse en el tipo de factura
	 */
	setBillStatusTxt: function(idType, txt) {
		this.vBillType[idType] = txt;
	},

    setReasonTxt: function(idReason, txtBoxInfo, txtBtn){
        this.vReasonStatus[idReason] = [];
        this.vReasonStatus[idReason]["boxinfo"] = txtBoxInfo;
        this.vReasonStatus[idReason]["btn"] = txtBtn;
    },

    /**
     * Metodo que gestiona la cancelacion de pedidos
     */
    submitCancelCart: function(idForm, sizeChangeModal){
        othis = this;
        idReason = this.reasonSelected;
        switch (idReason) {
            case 'reason1':
                this._changeSize(sizeChangeModal);
                break;
            case 'reason2':
            case 'reason4':
                this.submit(idForm, function(response){
                    othis.parseResponse(response);
                    if (othis.statusOK()) {
                    	othis.stopTimeout();
                        // si el submit se ha realizado correctamente
                        modalCancelCart.close();
                        // cambiar estado del tracking a cancelado
                        othis.changeStatusTrackCancel();
                        // deshabilitar procesos
                        othis.disabledProcess();
                    // TODO: mensaje pedido cancelado correctamente
                    }
                    else {
                    	othis.stopTimeout();
                        othis.endSubmitError();
                    }
                    othis.stopLoad();
                });
                break;
        }

    },

    /**
     * Abre el modal de ver factura
     */
    viewBill: function(PJson, modal){
		othis = this;
        //	Si es posible, abrimos la modal
        if (!this.viewBillOpened) {
            // cargar datos del formulario
			idpk = this.getOrderPK();
			if (idpk != '') {
				PJson.getData('/myaccount/getinvoicesdata/order_PK/' + idpk, 'view_bill');
			}
            this.viewBillOpened = true;
        }
        modal.open();
    },

    /**
     * Abre el modal de ver factura de servicios
     */
    viewServiceBill: function(PJson, modal){
		othis = this;
        //	Si es posible, abrimos la modal
		if (!$('btnPrint').hasClassName('disableButton')) {
	        if (!this.viewServiceBillOpened) {
	            // cargar datos del formulario
				idpk = this.getOrderPK();
				if (idpk != '') {
					PJson.getData('/myorder/getBookingReferences/order_PK/' + idpk, 'view_service_bill');
				}
	            this.viewServiceBillOpened = true;
	        }
	        modal.open();
		}
    },

    _activeSelectedReason: function(id){
        var label_id = id;
        label_id = 'label-' + label_id;
        $(label_id).addClassName('active');
    },

    /**
     * Si la opcion seleccionada es reason1
     * se cierra el modal de cancelar y abre el modal de cambiar talla
     */
    _changeSize: function(sizeChangeModal){
        //Lanzamos Modal de Cambiar Talla
        this.getSizeChangeInfo(sizeChangeModal);
        modalCancelCart.close();
    },

    _removeSelectedReason: function(){
        var labels = $$('.label-reason');
        labels.each(function(rem_bold){
            rem_bold.removeClassName('active');
        });
    },

	/**
	 *	deshabilita todos los procesos y oculta los  banners
	 */
    disabledProcess: function(){
    	// deshabilitar procesos
        this.hideButtonOrder();
        this.disableOrderExpand();
        this.disableChangeSize();
        this.disableAddressEdit();
        // ocultar todos los banners
        $(this.idBanners).hide();
    }

});

/**
 * ProcessReturnOrder - Devoluciones
 * =========================================
 * @modified: 	Cristina	(17-12-10)
 */
var ProcessReturnOrder = new Class.create(PrivaliaMyaccount, {
    initialize: function($super){
        $super();
        this.returnStatusTitle = [];
        this.returnStatusText = [];
        this.returnStatus = [];
        this.reasonChange = '0';
        this.cancelled_open_title = '';
        this.return_type = '';
        this.code_noReturn = 'msg0230020';
        this.mdl_noReturn = '';
        this.url_newReturn = '/myaccount/newreturn';
        this.url_viewReturn = '/myaccount/viewreturn';
        this.url_returns = '/myaccount/returns';
		this.idOrderPricingBox = 'order_pricing_box';
		this.involuntaryReturn = '';

		this.idInvoluntaryInfo = 'involuntary-return-info';
		this.s_involuntaryCostsInfo = [];

		//version
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'ProcessReturnOrder');
    },

    /**
     * Gestiona la adicion o eliminacion de lineas de producto en Nueva devolucion,
     * Corresponde al checkbox dentro de la lista de productos
     */
    addRemoveProducts: function(item){
    	if ($(item.id).hasClassName("isError")){
			$(item.id).removeClassName("isError");
		}
        //Buscamos el formulario al que corresponde el producto
        idForm = item.className + '_return_product';
        //Mostramos la caja de precios si no se veia ya
		if ($(this.idOrderPricingBox).hasClassName("hidden")){
	        $(this.idOrderPricingBox).removeClassName('hidden');
		}
        if (item.checked) {
            this.updateReturns(idForm, '/myreturn/addProduct');
	    	$('btnSubmitReturn').removeClassName("hidden");
        }
        else {
            this.updateReturns(idForm, '/myreturn/removeProduct');
			this.resetReasonCombo(item);
        }
        this.showReturnForm(item);
    },

    /**
     * Construye la pagina con los datos pasados por json previamente
     */
    buildPage: function(generate){
        switch (generate) {
            case 'returns':
                this.generateHtml({
                    pushData: this.pushReturns
                });
                break;

            case 'new_return':
                this.generateHtml({
                    pushData: this.pushNewReturn
                });
                // Gestiona la seleccion de las direcciones de envio
                this._returnRadioManagement();
                var range = this.feedSelectDates(this.getResData().order_pickup_range);
                $('return_date_combo').update(range);
                break;

            case 'view':
                this.generateHtml({
                    pushData: this.pushViewReturn
                });
				var pdf_link = this.generatePdfLink(this.getResData().waybill_delivery.waybill_PK);
                $('pdf-button').href = pdf_link ;
                break;

            default:
                this.generateHtml();
        }
    },

	/**
	 * Crea el link para el pdf del albaran de devolucion
	 */
	generatePdfLink: function(order_PK){
		return "/myreturn/getwaybill/id/" + order_PK;
	},

    /**
     * Gestiona la modificacion de la devolucion
     * Corresponde a la accion del combo de razones ademas de los radio buttons
     */
    modifyReturn: function(item){
        idForm = item.className + '_return_product';
        this.updateReturns(idForm, '/myreturn/modifyReason');
    },

    /**
     * Personalizacion del volcado para Nueva Devolucion
     */
    pushNewReturn: function(dataJson, index){
        var target = this.getTarget();

        if (target == "order_products") {
            //Mostramos el select solo si la cantidad es mayor que uno
            if (dataJson.ordline_quantityOrdered == 1) {
                dataJson.select_return_quantity = '<select id="product[' + dataJson.ordline_FK_stockp_PK + '][quantity]" name="product[quantity]" class="mar0" tabindex="1"><option value="1">1</option></select>';
                dataJson.show_quantity = "hidden";
            }
            else {
                quantity = this.feedSelectQuantity(dataJson.ordline_quantityOrdered, dataJson.ordline_FK_stockp_PK);
                dataJson.select_return_quantity = '<select id="product[' + dataJson.ordline_FK_stockp_PK + '][quantity]" name="product[quantity]" class="mar0" tabindex="1" onChange="Data.updateReturns(\'' + dataJson.ordline_FK_stockp_PK + '_return_product\' ,\'/myreturn/addProduct\');">' + quantity + '</select>';
            }
        }
        if (target == "order_pricing") {
            dataJson.order_subtotal = "0,00&nbsp;&euro;";
            dataJson.order_delivery_cost = "0,00&nbsp;&euro;";
            dataJson.order_amount = "0,00&nbsp;&euro;";
        }
        // Direcciones
		if(target == "delivery_addresses"){
			dataJson.memaddress_adtype = this.getAddressType(dataJson.memaddress_FK_adtype_PK);
		}

        // sumo datos a volcar
        this.addBuilt(dataJson);
    },

    /**
     * Personalizacion del volcado para Listado de Devoluciones
     */
    pushReturns: function(dataJson, index){
        var target = this.getTarget();

        if (target == "returns_data") {
        	// En funcion del estado(waybill_status) de la devolucion mostramos una descripcion del estado
			// Al metodo que devuelve el estado, se le pasan los parametros de estado, indicar si es un servicio(aqui no procede) y el target
        	dataJson.waybill_status = this.setOrderStatusList(dataJson.waybill_status,'', target);
            }

		// sumo datos a volcar
        this.addBuilt(dataJson);
    },

    /**
     * Personalizacion del volcado para viewreturn
     */
    pushViewReturn: function(dataJson, index){
        var target = this.getTarget();

        if (target == "waybill_lines") {
            /* To do: Eliminar ultima linea de enumeracion de los productos*/
        }
        if (target == "waybill_delivery") {
			if ((Country.getIso() !== 'mex')&&(Country.getIso() !== 'br')) {
				dataJson.waydel_preferred_pickup_time = this.getCollectionTime(dataJson.waydel_preferred_pickup_time);
			}else{
				dataJson.waydel_preferred_pickup_time = '';
			}
        }
        if (target == "order_status") {
        	//Pasamos valores: el tracking, si es servicio(aqui no procede), el target y el objeto dataJson
			dataJson = this.setOrderStatus(dataJson.ordstatus_tracking, '', target, dataJson);

        }
        if (target == "return_done") {
			if (dataJson.status === false){
				dataJson.confirmation_status ="hidden";
			}else{
				dataJson.confirmation_status ="";
			}
        }

        // sumo datos a volcar
        this.addBuilt(dataJson);
    },

    /**
     * Redirigir a la pagina de Nueva Devolucion
     */
    redirectToNewReturn: function(){
        document.location.href = this.url_newReturn;
    },

    /**
     * Redirigir a la pagina de Listado de Devoluciones
     */
    redirectToReturns: function(){
        document.location.href = this.url_returns;
    },

    /**
     * Redirigir a la pagina de Detalle de Devolucion
     */
    redirectToViewReturn: function(){
        document.location.href = this.url_viewReturn;
    },

	/**
	 * Al deseleccionar un elemento se resetea
	 * @param {Object} checkbox - para selecionar
	 */
	resetReasonCombo: function (checkbox){
		var idReasonCombo = "product[" + checkbox.className + "][reason]";
		$(idReasonCombo).value = 0;
	},

	/**
	 * Fija un texto informativo en caso de devolucion involuntaria
	 * @param {Object} T - texto que ha de aparecer en lugar del coste
	 */
	setInvoluntaryInfo: function(T){
        this.s_involuntaryCostsInfo = T;
    },

    /**
     * Muestra seccion del formulario correspondiente a devoluciones involuntarias
     */
    setInvoluntaryReturn: function(item){
		this.involuntaryReturn = true;
        var idForm = item.className + "_return_product";
        var formBox = item.className + "-involuntary-reason";
        var idWrongRadio = item.className + "-wrong-radio";

        //Mostramos los formularios que procedan y llamamos a la funcion que gestiona el proceso
        $(formBox).removeClassName('hidden');
        this.setWrongReason($(idWrongRadio));
		//Mostramos mensaje de informacion
		$(this.idInvoluntaryInfo).show();
    },


    /**
     * Funcion para fijar la ventana modal de error para Nueva Devolucion
     */
    setModal: function(modalNoReturn){
        this.mdl_noReturn = modalNoReturn;
    },

    /**
     * Desde returns, fija el identificador de la orden y pasa a Nueva Devolucion
     */
    setNewReturn: function(idpk){
        othis = this;
        if (idpk != '') {
            var url = '/myreturn/setOrderReturn/order/' + idpk;
            new Ajax.Request(url, {
                onComplete: function(){
                    othis.redirectToNewReturn();
                },
                onFailure: function(){
                    othis.errorMessage('101');
                },
                onException: function(){
                    othis.errorMessage('102');
                }
            });
        }
    },

    /**
     * Desde returns, fija el identificador de la orden y pasa a Detalle de Devolucion
     */
    setReturn: function(idpk){
        othis = this;
        if (idpk != '') {
            var url = '/myaccount/setReturnId/waybill_PK/' + idpk;
            new Ajax.Request(url, {
                onComplete: function(){
                    othis.redirectToViewReturn();
                },
                onFailure: function(){
                    othis.errorMessage('101');
                },
                onException: function(){
                    othis.errorMessage('102');
                }
            });
        }
    },

    /**
     * Discrimina segun sea la devolucion (voluntaria o involuntaria)
     * Corresponde al valor seleccionado en el combo de reason
     */
    setReturnReason: function(reasonCombo){
		if (reasonCombo.hasClassName("isError")){
	        reasonCombo.removeClassName("isError");
		}
        switch (reasonCombo.value) {
            case '100':
                this.setInvoluntaryReturn(reasonCombo);
                break;
            default:
                this.modifyReturn(reasonCombo);
                this.setVoluntaryReturn(reasonCombo);
                break;
        }
    },

    /** TODO: quizas refactorizar todos estos metodos
     * Obtiene los textos correspondientes a los estados de las devoluciones en Lista de devoluciones
     */
    setReturnStatus: function(T){
        this.returnStatus = T;
    },

    /**
     * Obtiene los textos correspondientes a los estados de las devoluciones en detalle de devoluciones
     */
    setReturnStatusText: function(LT){
        this.returnStatusText = LT;
    },

    /**
     * Obtiene los titulos correspondientes a los estados de las devoluciones
     */
    setReturnStatusTitle: function(T){
        this.returnStatusTitle = T;
    },

    /**
     * Logica para gestionar devoluciones voluntarias
     */
    setVoluntaryReturn: function(item){
		this.involuntaryReturn = false;
        var idFormBox = item.className + "-involuntary-reason";
        //Ocultamos los formularios
        $(idFormBox).addClassName('hidden');
		//Ocultamos mensaje de informacion
		$(this.idInvoluntaryInfo).hide();
    },

    /**
     * Logica para gestionar devoluciones defectuosas o incorrectas
     */
    setWrongReason: function(item){
        //Definimos los elementos con los que trabajaremos
        othis = this;
        var stock_PK = item.className;
        var idForm = stock_PK + "_return_product";
        var idReasonHidden = stock_PK + "_reason";
        var idWrongBox = stock_PK + "-incorrect";
        var idFaultyBox = stock_PK + "-faulty";
        var idTextarea = "product[" + stock_PK + "][message]";
        var v_reasonRadios = $(idForm).getInputs('radio', 'product[reason_radio]');

        //Pedido incorrecto
        if (item.id == (stock_PK + "-wrong-radio")) {
            //Seteamos el campo hidden
            var radioBtn = v_reasonRadios.findAll(function(item){
                return item.checked === true;
            });
            $(idReasonHidden).setValue($F(radioBtn[0]));

            //Actualizamos devolucion y vista de formularios
            othis.updateReturns(idForm, '/myreturn/modifyReason');
            $(idFaultyBox).addClassName('hidden');
            $(idWrongBox).removeClassName('hidden');

            //Guardamos la razon en el campo hidden y la enviamos
            v_reasonRadios.each(function(item){
                item.stopObserving();
                item.observe('click', function(){
                    $(idReasonHidden).setValue($F(item));
                    othis.updateReturns(idForm, '/myreturn/modifyReason');
                });
            });
        }
        //Pedido defectuoso
        else {
            //Seteamos el campo hidden
            $(idReasonHidden).setValue(107);

            //Actualizamos devolucion y vista de formularios
            othis.updateReturns(idForm, '/myreturn/modifyReason');
            $(idWrongBox).addClassName('hidden');
            $(idFaultyBox).removeClassName('hidden');

            //Enviamos el texto en onblur
            $(idTextarea).stopObserving();
            $(idTextarea).observe('blur', function(){
                othis.updateReturns(idForm, '/myreturn/modifyReason');
            });
        }
    },

    /**
     * Muestra la modal de Nadie es Perfecto
     */
    showNoReturn: function(){
        this.mdl_noReturn.open();
    },

    /**
     * Muestra u oculta el formulario de devoluciones
     */
    showReturnForm: function(item){
        var idFormBox = item.className + "-return-info";
        $(idFormBox).toggleClassName('hidden');
    },

	/**
	 * Submit personalizado para Nueva Devolucion
	 */
	submitReturn: function(idForm) {
		var othis = this;
		this.submit(idForm, function(response) {
			othis.parseResponse(response);
			if(othis.statusOK()) {
				othis.redirectToViewReturn();
			}
			else {
				othis.endSubmitError();
			}
			othis.stopLoad();
			othis.stopTimeout();
		});
	},

    /**
     * Actualiza el coste de la devolucion
     */
    updateReturns: function(idForm, url, onComplete){
        if (idForm != '') {
            if (url != '') {
                params = {
                    parameters: Form.serialize(idForm),
                    onFailure: (function(){
                        this.errorMessage('01');
                    }).bind(this)
                };
                if (onComplete != null) {
                    params.onComplete = onComplete;
                }
                else {
                    // onComplete por defecto
                    params.onComplete = this._submitReturnUpdate.bind(this);
                }
                // llamada ajax
				/*	TODO: Loader para las llamadas Ajax	*/
                //this.load(idForm);
                this._hideErrors(idForm);
                new Ajax.Request(url, params);
            }
        }
    },

    /**
     * Gestiona la seleccion de las direcciones de envio
     */
    _returnRadioManagement: function(){
        //Obtenemos elementos con los que trabajar
        othis = this;
        var form = $('addresses-form');
        var v_radioAddressButtons = form.getInputs('radio', 'selectaddress');

        //Fijamos la primera direccion como default y actualizamos
        var firstRadioBtn = v_radioAddressButtons.first();
        firstRadioBtn.writeAttribute("checked", "checked");
        this.updateReturns(form, '/myreturn/modifyPickupAddress');

        //Actualizamos direccion y costes con cada click
        v_radioAddressButtons.each(function(item){
            item.observe('click', function(){
                othis.updateReturns(form, '/myreturn/modifyPickupAddress');
            });
        });
    },

    /**
     * Envio de datos de las actualizaciones
     */
    _submitReturnUpdate: function(response){
        this.parseResponse(response);
        if (this.statusOK()) {
            //actualizacion correcta, volcamos los datos
            var newData = this.getResData();
            $('return-subtotal').update(newData.return_costs.return_subtotal);
			if (newData.return_costs.return_costs != "0,00 &euro;"){
            	$('return-cost').update(newData.return_costs.return_costs);
	            $('return-total').update(newData.return_costs.return_total);
			}else{
				if(this.involuntaryReturn){
	            	$('return-cost').update(this.s_involuntaryCostsInfo);
		            $('return-total').update(newData.return_costs.return_total + "*");
				}else{
					$('return-cost').update(newData.return_costs.return_costs);
	           	 	$('return-total').update(newData.return_costs.return_total);
				}
			}
            this.stopLoad();
        }
        else {
            //Mostramos error en el select que proceda y paramos la carga
            this.endSubmitError();
            this.stopLoad();
            this.formActual = '';//TODO: ver si es necesario
            //Recuperamos los datos de los errores para resetear el select
            var error_code = this.getResData().errors;
            //Obtenemos el id y reseteamos el select
            var hash = $H(error_code);
            var idSelect = hash.keys();
            $(idSelect[0]).setValue(0);

            //comprueba si ha de mostrar la modal
            if (this.getResTextcodes() == this.code_noReturn) {
                this.showNoReturn();
            }
        }
    }

});/**
 *  privalia.payment.base.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 99-privalia.mycart.js
 * @revision: 	1.0
 */

/**
 * PrivaliaPaymentBase - Common
 * =========================================
 * @modified: 	Marcos		(28-04-11)
 */
var PrivaliaPaymentBase = Class.create(PrivaliaMyCart, {
	initialize: function($super) {
		$super();
		
		//version
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaPaymentBase');
	}
	
});
/**
 *  privalia.promotions.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 90-privalia.base.js
 * @revision: 	1.0
 */ 

/**
 * PrivaliaJsonPromotions - Common
 * =========================================
 * @modified: 	Cristina	(17-12-10)
 */
var PrivaliaJsonPromotions = Class.create(PrivaliaBase, {

	initialize: function($super) {
		$super();
		
		//version 
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaJsonPromotions');
	}

});

/**
 * PrivaliaPromotions - Common
 * =========================================
 * @modified:     Cristina	(17-12-10)
 */
var PrivaliaPromotions = new Class.create(PrivaliaJsonPromotions, {
    
	initialize: function($super, section) {
		$super();

		this.idSendForm = 'christmass-send-form';
		
		//version 
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaPromotions');
	},
	

	/**
	 * Submit personalizado para recuperar datos de la promocion de navidad
	 * Microsites/index action: /frontoffice/acceptChristmasPromoConditions/source/escaparate/ 
	 * Confirmation action: /frontoffice/acceptChristmasPromoConditions/source/pedido/ 
	 * @param {Object} idForm
	 */
	submitChristmassPromo: function(idForm){
		this.submit(idForm, this._submitChristmassPromotion.bind(this));
	},
	
	/**
	 * Gestiona la respuesta del requerimiento de datos
	 * @param {Object} response
	 */
	_submitChristmassPromotion: function(response) {
		this.parseResponse(response);
		if(this.statusOK()) {
			this.stopLoad();
			//Realizamos un get data a partir de la respuesta Ajax
			this.getDataFromAjax('getPromo');
			//Mandamos el formulario
			$(this.idSendForm).submit();
		}else {
			this.stopLoad();
            this.stopTimeout();
			//Notify en pagina principal y gestion de errores
			this.endSubmitError();
		}
	}
});//v3.3|ruben|20110704
var PrivaliaJsonPublic=Class.create(PrivaliaBase,{initialize:function($super){$super();this.idBoxCoRegister='co-register-box';this.idCoRegisterForm='co-register-form';this.idCountryField='country';this.url_coRegisterForm='';this.idCoRegisterArea='co-register';this.idCoRegisterThanksArea='co-register-thanks';this.idCoRegisterSorryArea='co-register-sorry';this.version=3.0;this.setVersion(this.version,'PrivaliaJsonPublic');},buildPage:function(generate){switch(generate){case'get_co_registering':this.generateHtml();this.showCoRegister();break;default:this.generateHtml();}},showCoRegister:function(){$(this.idBoxCoRegister).removeClassName("hidden");},showSorry:function(){$(this.idCoRegisterArea).addClassName("hidden");$(this.idCoRegisterSorryArea).removeClassName("hidden");},showThanks:function(){$(this.idCoRegisterArea).addClassName("hidden");$(this.idCoRegisterThanksArea).removeClassName("hidden");},submitGroupaliaForm:function(idForm){this.submit(idForm,this._submitGroupaliaForm.bind(this));},_submitGroupaliaForm:function(response){this.stopTimeout();this.parseResponse(response);if(this.statusOK()){this.stopLoad();this.closeForm();this.showThanks();}
else{this.showSorry();this.stopLoad();this.endSubmitError();}}});var PrivaliaPublic=new Class.create(PrivaliaJsonPublic,{initialize:function($super){$super();this.errId='15';this.notLoggedErrorMsg='msg0100403';this.idCart='divCart';this.idFBForm="register_form_fb";this.idLoginError='auth_error';this.idLoginForm='auth_login';this.idOtherMailForm='other_mail';this.idPasswordInput='input_member_password';this.loginHeight='';this.loginErrorHeight='119';this.url_userLogged='/auth/isUserLogged';this.input_memberLogin='member_login_email';this.input_memberPassMd5='member_login_password';this.input_memberPass='input_member_password';this.s_alertBoxCopyAndroid='';this.s_alertBoxCopyIphone='';this.version=3.0;this.setVersion(this.version,'PrivaliaPublic');Event.observe(window,'load',this.focus.bind(this));},callUserLogged:function(){this.startTimeout();new Ajax.Request(this.url_userLogged,{onComplete:(function(response){this.stopTimeout();this.parseResponse(response);if(this.getResData().user_logged=="1"){this.redirectToMicrosites();}}).bind(this)});},androidCheck:function(){Event.observe(window,'load',(function(){if(this.checkUserAgent('android')){var question=confirm(this.s_alertBoxCopyAndroid);if(question){window.location='market://details?id=com.privalia.privalia';}}}).bind(this));},iPhoneCheck:function(){Event.observe(window,'load',(function(){if(this.checkUserAgent('iphone')||this.checkUserAgent('ipod')){var question=confirm(this.s_alertBoxCopyIphone);if(question){window.location=this.setLinkAppStore();}}}).bind(this));},focus:function(){$(this.input_memberLogin).focus();},forgotSuccess:function(){$('forgot_form').hide();$('forgot_valid').show();},registerSuccess:function(){$('register_form').hide();$('register_valid').show();},resetError:function(){$(this.idLoginError).update('');$(this.idCart).setStyle({height:this.loginHeight});},setAndroidAlertCopy:function(txt){this.s_alertBoxCopyAndroid=txt;},setIphoneAlertCopy:function(txt){this.s_alertBoxCopyIphone=txt;},setIdMails:function(){var url=this.getUrl(),v_urlRegister=url.split("/");if(v_urlRegister.indexOf("godfather")>-1){var idMemSponsored=(v_urlRegister[6]);var idMailGoogfather=(v_urlRegister[8]);var idMailMember=(v_urlRegister[10]);$('member_godfather_encrypted').value=idMemSponsored;$('member_email').value=idMailMember;$('member_godfather').value=idMailGoogfather;}},setLinkAppStore:function(){switch(Country.getIso()){case'es':var applink="http://itunes.apple.com/es/app/privalia-mobile/id394874573?mt=8&ign-mpt=uo%3D4=&";break;case'it':var applink="http://itunes.apple.com/it/app/privalia-mobile/id394874573?mt=8&ign-mpt=uo%3D4=&";break;case'mex':var applink="http://itunes.apple.com/mx/app/privalia-mobile/id394874573?mt=8&ign-mpt=uo%3D4=&";break;}
return applink;},setProviderRegistry:function(){var idInput='member_publisher_code',s_paramProvider='provider=',s_provider='',s_url=this.getUrl(),v_provider=[];if(s_url.indexOf(s_paramProvider)>0){v_provider=s_url.split(s_paramProvider)[1];s_provider=v_provider.split('&')[0];}
if(s_provider!=''){$(idInput).value=s_provider;}},setToken:function(){var url=document.location.href,vUrl=url.split("/"),tokenUrl=vUrl[6];$('token').value=tokenUrl;},showCodeMsg:function(){var err=this.getResTextcodes();if(err!=''){$(this.idCart).setStyle({height:this.loginErrorHeight+'px'});var msg=MSGCODE[err];var error=new Element('div',{className:'field clr-red'}).update(msg);$(this.idLoginError).update(error);$(this.idLoginError).appear();if(this.loginHeight==''){this.loginHeight=$(this.idCart).getStyle('height');}}},showNotLoggedMsg:function(){var err=this.notLoggedErrorMsg;if(err!=''){$(this.idCart).setStyle({height:this.loginErrorHeight+'px'});var msg=MSGCODE[err];var error=new Element('div',{className:'field clr-red'}).update(msg);$(this.idLoginError).update(error);$(this.idLoginError).appear();if(this.loginHeight==''){this.loginHeight=$(this.idCart).getStyle('height');}}},submitLoginEncrypted:function(idForm,onComplete,params){if(idForm!=''&&!this.b_submitting){var url=$(idForm).action;if(url!=''){this.b_submitting=true;params={parameters:params,onFailure:(function(){this.errorMessage('01');}).bind(this)};if(onComplete!=null){params.onComplete=onComplete;}
else{params.onComplete=this.endSubmit.bind(this);}
this.load(idForm);this.idFormActual=idForm;this._hideErrors(idForm);new Ajax.Request(url,params);}}
return false;},submitLogin:function(){if(typeof window.hex_md5==='function'){var memberPassMd5=$(this.input_memberPassMd5).value=hex_md5($F(this.input_memberPass));var email=$F(this.input_memberLogin);if(memberPassMd5!=''){var params='login_type=md5&member_login_password='+memberPassMd5+'&member_login_email='+email;this.submitLoginEncrypted(this.idLoginForm,this._submitResponseLogin.bind(this),params);}}
else{this.errorMessage('01');}
return false;},submitForgot:function(idForm){var othis=this;this.submit(idForm,function(response){othis.parseResponse(response);if(othis.statusOK()){othis.forgotSuccess();}
else{othis.endSubmitError();}
othis.stopTimeout();othis.stopLoad();});return false;},submitRegister:function(idForm){var othis=this;this.submit(idForm,function(response){othis.parseResponse(response);if(othis.statusOK()){if(Country.getCoRegister()){othis.getDataFromAjax('get_co_registering');}
othis.registerSuccess();var WService=new PrivaliaRetargeting();WService.insertConversionImage();}
else{othis.endSubmitError();}
othis.stopTimeout();othis.stopLoad();});return false;},_submitResponseLogin:function(response){this.parseResponse(response);if(this.statusOK()){this.loadText('welcome');this.redirectToMicrosites();}
else{var sErrTrack='',sFormName='';this.stopLoad();this.showCodeMsg();switch(this.getResTextcodes()){case'msg0200012':$(this.input_memberPass).focus();sErrTrack='input_member_password.msg0200012-';sFormName='auth_login';this.setEventTracking(sErrTrack,sFormName);break;case'msg0200013':sErrTrack='input_member_password.msg0200013-';sFormName='auth_login';this.setEventTracking(sErrTrack,sFormName);}}}});/**
 *  privalia.sellingservices.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 90-privalia.base.js
 * @revision: 	1.0
 */

/**
 * PrivaliaJsonSellingServices Common
 * =========================================
 * @requieres:    -
 * @revision:     -
 * @modified:     Cristina	(17-12-10)
 */
var PrivaliaJsonSellingServices = Class.create(PrivaliaTrackingStatus, {
	initialize: function($super){
        $super();

      //version
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaJsonSellingServices');
    },

	/**
     * Construye la pagina con los datos pasados por json previamente
     */
    buildPage: function(generate){
        switch (generate) {
            case 'view_service_bill':
                this.generateHtml({
                    pushData: this.pushServiceBills
                });
                break;

            default:
                this.generateHtml();
        }
    },

	/**
	 * Get Data personalizado para Ver Facturas de Servicios
	 * @param {Object} dataJson - objeto con la informacion proporcionada
	 * @param {Object} index - recursion
 */
    pushServiceBills: function(dataJson, index) {
        var target = this.getTarget();

		if (target == "service_order_data") {
			//Para cada linea extraemos la informacion necesaria
			dataJson.booking_data.each(function(item){
				item.pdf_link = '/myorder/getBookingReference/id/' + item.ordline_PK;
				item.ordline_description = item.ordline_description;

				//Puede haber mas de una referencia por producto, se resetea y se van sumando
				item.bookreferences = '';
				item.booking_references.each(function(item2){
					item.bookreferences += '<label class="service-reference"><input type="radio" onclick="Service.selectBookReference(' + item2.campbookref_PK + ')" value="' + item2.campbookref_PK + '" name="idbookref" /> ' + item2.campbookref_code + '</label>';
				});

				item.booking_references = '';
				this.addBuilt(item);
			}, this);
        }
    }
});


/**
 * PrivaliaSellingServices - Common
 * =========================================
 * @requieres:    -
 * @revision:     2.1
 * @modified:     Ruben	(09-05-11)
 */
var PrivaliaSellingServices = new Class.create(PrivaliaJsonSellingServices, {
    initialize: function($super, data, section) {
		$super();

		this.b_bookRefSelected = 	false;		// en el modal de imprimir bono, saber si hay un bono seleccionado

		this.btnConditions	= 'btnConditions';
		this.btnDocuments = 'btnDocuments';

		this.cssService	= 'service';			// nombre class para servicio
		this.cssProduct	= 'standardProduct';	// nombre class para productos normales de privalia
		this.b_isService =			0;			// 0=no es servicio, 1=es servicio
		this.vDocuments =			[];			//	array Documentos

		this.idPreferencesSelect = "select-size";

		//version
	   	this.version =				2.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaSellingServices');

		if(!Object.isUndefined(data)) {
			this.init(data, section);
		}
	},

	/**
	 * Funcion para cambiar el estado del flag de condiciones de uso, con funcionalidades extra
	 * @param {Object} data - objeto donde se encuentra la informacion de la url
	 * @param {Object} modal - modal de aceptacion de condiciones
	 * @param {Object} idCheckbox - id del checkbox en summary
	 */
	acceptConditions: function(data, modal, idCheckbox){
		//extraemos la url
		var url_accept = this.getAcceptUrl(data.getResData());
		//cambiamos el estado del flag de condiciones
		this._callAcceptConditions(url_accept, modal, idCheckbox);
	},

	/**
	 * Si es un servicio elimina la class hidden y
	 * anyade la class hidden al bloque de productos normales
	 */
	applyServicePage: function () {
		$$('.'+ this.cssService).invoke('removeClassName', 'hidden'); 	// elimina hidden
		$$('.'+ this.cssProduct).invoke('addClassName', 'hidden'); 		// ocultar bloques normal
	},

	/**
	 * Metodo para comprobar la aparicion del boton de cancelar orden en caso de ser un servicio
	 * @param {Object} data - objeto con datos a comprobar
	 */
	checkCancelButton: function (data) {
		if (data.getResData().order_actions.cancel){
			//Si se puede cancelar, mostramos el boton
			this.showButtonOrder();
		}else{
			this.hideButtonOrder();
		}
	},

	/**
	 * Metodo que comprueba si es un servicio
	 */
	checkIfService: function (data) {
		this.b_isService = data.campaign_data.campaign_product_types.service;	// si es un servicio devolvera 1
		return this.b_isService;
	},

	/**
	 * Metodo para mostrar o no la opcion de reabrir pedido de servicio al cancelar
	 * @param {Object} data - objeto con datos a comprobar
	 */
	checkPendingOrder: function (data) {
		if(!data.getResData().order_actions.reopen){
			$("reopen-order-line").toggleClassName("hidden");
		}
	},

	/**
	 * Dependiendo de la seccion en la que nos encontremos
	 * cambiar los bloques que faltan por controlar, mostrar, etc de esta pagina
	 */
	completeServicePage: function (data, section) {
		switch(section) {
			case 'fittingroom':
				this.transferCampaignData();
				this.setConditions(data);
				this.setDocuments(data);
				// sustituimos la primera opcion del select de tallas-preferencias
				this.setSelectFirstOption();

				break;
			case 'summary':
				this.conditionsModalSetup();

				// Compruebo si el usuario ha aceptado las condiciones
				if (data.member_missing_data.member_accepted_campaign_tandc){
					//Si: activo el checkbox
					if($('accept_conditions') != null){
						$('accept_conditions').writeAttribute("checked", "checked");
					}
				}else{
					//No: muestro la modal
					modalAcceptServiceConditions.open();
				}
				break;

			case 'orderview':
				// Controla la aparicion del banner y el boton de final de pagina para imprimir factura
				this.printBillBanner(data);
				// aplica cambios de estilo a la pagina
				Cufon.replace('.cufon');
				Cufon.replace('.cufon2');
				break;
			case 'orders':
				break;
			default:
				// no hago nada
				break;
		}
	},

	/**
	 * Metodo extrae la url para aceptar las condiciones
	 */
	conditionsModalSetup: function () {
		if($('conditionsModalWrap') != null && $('conditions-modal-content') != null){
			$('conditionsModalWrap').update($('conditions-modal-content').innerHTML);
		}
	},

	/**
	 * Vuelca el contenido de una div a otra, ocultando los datos de otro modal (se aprovecha una modal para dos tipos de content)
	 */
	conditionsStatusModal: function (){
		$('insTitle').hide();
		$('instructionsContent').hide();

		$('conTitle').show();
		$('conditionsContent').show();
	},

	/**
	 * Comprueba si es un servicio
	 */
	isService: function() {
		return (this.b_isService == 1);
	},
	/**
	 * Mover al div contenedor
	 */
	transferCampaignData: function () {
		if($('reference')!== null && $('conditions')!== null && $('documents')!== null){
			$('works-container').update($('reference').innerHTML);
			$('conditions-container').update($('conditions').innerHTML);
			$('documents-container').update($('documents').innerHTML);
			$('reference').update('');
			$('conditions').update('');
			$('documents').update('');
		}
	},

	/**
	 * Metodo extrae la url para aceptar las condiciones
	 */
	getAcceptUrl: function (data) {
		var url = data.campaign_data.campaign_accept_url;
		return url;
	},

	/**
	 * Metodo extrae la url a redireccionar desde getSummaryData
	 */
	getRedirectionUrl: function (data) {
		var url = data.campaign_data.campaign_reject_url;
		return url;
	},


    /**
     * Oculta el boton de cancelar pedido en order detail
     */
    hideButtonOrder: function(){
		if($('btnCancelOrder')!=null){
        $('btnCancelOrder').addClassName('hidden');
		}
	},

	/**
	 * Inicializacion del objeto Selling Services
	 * @param {Object} data
	 * @param {Object} section
	 */
	init: function (data, section) {
		if(this.checkIfService(data) == 1) {
			this.applyServicePage();
			this.completeServicePage(data, section);
		}
	},

	/**
	 * Vuelca el contenido de una div a otra, ocultando los datos de otro modal (se aprovecha una modal para dos tipos de content)
	 */
	instructionsStatusModal: function (){
		$('conTitle').hide();
		$('conditionsContent').hide();

		$('insTitle').show();
		$('instructionsContent').show();
	},

	/**
	 * Controlamos si aparece el banner superior para imprimir la factura y el status del localizador
	 */
	printBillBanner: function(data){
		if(data.order_actions.print_service_voucher == true){
			$('printBillBanner').show();
			$('btnPrint').show();
			$('available').removeClassName('hidden');
		}
		else{
			$('printBillBanner').hide();
			$('notAvailable').removeClassName('hidden');
			// Se deshabilita el boton del final de la pantalla tambien
			$('btnPrint').addClassName('disableButton');
		}
	},

	selectBookReference: function (idBookRef) {
		// montar la URL con el pdf del localizador que toca
		var url = '/myorder/getBookingReference/id/';
		$('linkPrintBookRef').href = url + idBookRef;

		// habilita el boton
		if(!this.b_bookRefSelected) {
			$('btnPrintBookRef').removeClassName('disableButton');
			this.b_bookRefSelected = true;
		}
	},

	/**
	 * Gestionar bloque de Condiciones de uso, si esta vacio no mostramos nada
	 */
	setConditions: function (data) {
		var sData = data.campaign_data.campcond_webconditions; // string, guarda el texto relacionado con las condiciones de uso del servicio
		if(sData == '') {
			$(this.btnConditions).hide();
		}
	},

	/**
	 * Gestionar bloque de Documentos de interes, si esta vacio no mostramos nada
	 */
	setDocuments: function (data) {
		this.vDocuments = data.campaign_data.campaign_docs;

		// primero se comprueba si es un array
		if(Object.isArray(this.vDocuments)== true) {
			// si es un array se comprueba si esta vacio
			if(this.vDocuments.length == '') {
				$(this.btnDocuments).hide();	// si esta vacio se oculta el boton del toggle ya que no hay informacion a mostrar
			}
		}
	},

	/**
	 * Gestionar bloque de Instrucciones de uso
	 */
	setReference: function (data) {
		var sData = data.campaign_data.campcond_infoconditions;
		if(sData == '') {
			$(this.btnReference).hide();
		}
	},

	/**
	 * Funcion para la sustitucion del copy dentro de la primera opcion del select de talla-preferencias
	 * @ v_servicesSelectText[] - variable global declarada en el template para transferir el copy
	 */
	setSelectFirstOption: function(){
		if (typeof(v_servicesSelectText) != 'undefined') {
			$(this.idPreferencesSelect).firstDescendant().update(v_servicesSelectText[0]);
		}
	},

	/**
     * Muestra el boton de cancelar pedido en order detail
     */
    showButtonOrder: function(){
        $('btnCancelOrder').removeClassName('hidden');
    },

    verifyBookRefSelected: function () {
    	if(this.b_bookRefSelected) {
    		return true;
    	}
    	else{
    		return false;
    	}
    },

	/**
	 * Llamada interna para cambiar el flag de condiciones de uso
	 * @param {Object} url
	 * @param {Object} modal
	 * @param {Object} idCheckbox
	 */
	_callAcceptConditions: function(url, modal, idCheckbox){

		new Ajax.Request(url, {
			onComplete: (function(response){
				this.parseResponse(response);
				if (this.statusOK()) {
					//si todo va bien, cerramos la modal y checkeamos
					modal.close();
					$(idCheckbox).checked = true;
	}
			}).bind(this)
		});
	}

});
/**
 *  privalia.social.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 90-privalia.base.js
 * @revision: 	1.2
 */ 

/**
 * PrivaliaSocial - Common
 * =========================================
 * @modified:     Marcos	(15-6-11)
 */

var PrivaliaSocial = Class.create(PrivaliaBase, {
	initialize: function($super, data, section, isAdultCampaign) {
		$super();
		this.bIsAdultCampaign = isAdultCampaign;
		this.nOrderLength = '';
		this.sCampaignName = '';
		this.sFacebookTracking = '?provider=smmfbkshr';
		this.sTwitterTracking = '#provider=smmtwrshr';
		this.sProductName = '';
		
		this.code_EsAppId = 119956331422980;		
		this.code_ItAppId = 115384625214740;
		this.code_MexAppId = 233733629976596;
		this.code_BrAppId = 213391272034152;
		
		if(!Object.isUndefined(data)) {
			this._init(data, section);
		}

		//version
	   	this.version = 1.1;
	   	this.setVersion(this.version, 'PrivaliaMicrositesBase');
	},
	
	/**
	 * Construye el area de Compartir, para ello, ha de crear 2 objetos de configuracion
	 * antes de cargar el script de AddThis e inicializarlo. 
	 * @param {Object} section
	 */
	buildAddThisSharingArea: function (data, section){
		this.setSharingObject (data, section);
		this.setConfigObject (section);
		this._initAddThisScript (data, section);
		this.showSharingAreas ();
	},
	
	/**
	 * Construye el area de Compartir con Facebook, especificamente el boton que permite el lanzamiento del feed dialog
	 * @param {Object} data
	 * @param {Object} section
	 */
	buildFacebookSharingArea: function (data, section){
		this.setFeedDialogLink (data, section);
	},
	
	/**
	 * Crea el objeto de configuracion del Addthis
	 * @param {Object} data
	 * @param {Object} section
	 */
	setConfigObject: function (section){
		if (section !== 'confirmation'){
			addthis_config = {ui_language: this._getUILanguage()};
		}
	},

	/**
	 * Seteamos el href del link de facebook
	 * @param {Object} data
	 * @param {Object} section
	 */
	setFeedDialogLink: function (data, section){
		var aFacebookLinks = $$('.facebook-feed'),
		nFacebookLinksSize = aFacebookLinks.length;
		
		if (section !== 'confirmation'){
			for (var i = nFacebookLinksSize; i--;){
				aFacebookLinks[i].writeAttribute('href', this._getFeedDialogParameters(data, section));
			}
		}
	},
	
	/**
	 * Social - Crea el objeto con los parametros de Compartir del Addthis
	 * @param {Object} section
	 */
	setSharingObject: function (data, section){
		if (section !== 'confirmation'){
			addthis_share = this._getSharingObj(data, section);
		}else{
			var result = this._getSharingObj(data, section);
			for(var i=0; i < result.length; i++){
				window['addthis' + i + '_share'] = result[i];
			};
		}
	},

	/**
	 * Muestra las areas de los botones para compartir
	 */
	showSharingAreas: function(){
		var aShareAreas = $$('.sharing-area'),
		nShareAreasSize = aShareAreas.length;
		
		for (var i = nShareAreasSize; i--;){
			aShareAreas[i].removeClassName('hidden');
		}
	},
	
	/**
	 * Inicializacion del objeto Social
	 * @param {Object} data
	 * @param {Object} section
	 */
	_init: function (data, section) {
		if (Country.getSocial()) {
			this.buildAddThisSharingArea (data, section);
			this.buildFacebookSharingArea (data, section);
		}
	},
	
	/**
	 * Inicializa el script de Addthis
	 * si la seccion es confirmation, tambien fija el objeto de configuracion para cada area de compartir
	 * @param {Object} data
	 * @param {Object} section
	 */
	_initAddThisScript: function (data, section){
		if (section !== 'confirmation'){
			addthis.init();
		} else {
			for (var i = 0; i < this.nOrderLength; i++ ){
				addthis.addEventListener('addthis.ready', function() {
					addthis.toolbox('.addthis' + i, addthis_config, window['addthis' + i +'_share']);
				});
			}
			addthis.init();
		}
	},	
		
	/**
	 * Devuelve un string con la url del logo de la marca
	 * @param {Object} data
	 * @param {Object} section
	 */
	_getBrandPicture: function(data, section){
		var sBrandPicture = '';
		switch (section) {
			case 'fittingroom':
				if (data.campaign_images !== undefined) {
					sBrandPicture = "http://" + Country.getIso() + ".privalia.com" + data.campaign_images.brandlogo;
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_getBrandPicture: data.campaign_images not found');
					}
				}
				break;
			case 'confirmation':
				if (data.order_data !== undefined) {
					sBrandPicture = "http://" + Country.getIso() + ".privalia.com" + data.order_data.campaign_logo;
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_getBrandPicture: data.order_data not found');
					}
				}
				break;
			default:
		}	
		
		if (sBrandPicture !== ''){
			return sBrandPicture;
		} else {
			return '';
		}
	},
	
	/**
	 * Devuelve un string con la fecha de finalizacion de la campanya
	 * @param {Object} data
	 */
	_getCampaignEnd: function(data){
		if (data.campaign_data !== undefined){
			return data.campaign_data.campaign_enddate;
		} else {
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaSocial@_getCampaignEnd: data.campaign_data not found');
			}
			return '';
		}
	},
	
	/**
	 * Devuelve un string con la url de la imagen alargada de la campanya
	 * @param {Object} data
	 * @param {Object} section
	 */
	_getCampaignPicture: function(data, section){
		var campaign_PK = this.getUrlParamValue('campaign');
		if (campaign_PK !== ''){
			return "http://" + Country.getIso() + ".privalia.com/front/get/front/get/photo/" + campaign_PK + "_-_images_-_960ximg-esc-today.jpg";
		} else {
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaSocial@_getCampaignPicture: campaign_PK not found');
			}
		}
	},
	
	/**
	 * Recupera el valor del Deadline, comun para todas las secciones
	 * @param {Object} oResData
	 */
	_getDeadLine: function (oResData){
		var sDeadLine = '';
		
		if (oResData.campaign_data !== undefined) {
			sDeadLine = oResData.campaign_data.campaign_enddate;
		} else {
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaSocial@_getDeadLine: data.campaign_data not found');
			}
		}
		
		if (sDeadLine !== ''){
			return sDeadLine;
		} else {
			return '';
		}
	},
	
	/**
	 * Devuelve el valor del titulo del dialogo a compartir
	 * @param {Object} data
	 * @param {Object} section
	 */
	_getFeedDialogCaption: function (){
		return Country.getIso() + '.privalia.com'
	},
	
	/**
	 * Devuelve el valor del campo description que ha de aparecer al compartir en Facebook
	 * En caso de ser una campanya para adultos, el copy sera el fijado en estos casos
	 * @param {Object} data
	 * @param {Object} section
	 */
	_getFeedDialogDescription: function (data, section){
		var sFeedDialogDescription = '',
		oResData = data.getResData(); 
				
		switch (section) {
			case 'home':		//Fall Through
			case 'shopwindow':
				sFeedDialogDescription = data.getTxt('until') + ' ' + this._getDeadLine(oResData) + '. ' + data.getTxt('loseIt'); 
				break; 
			case 'fittingroom':
				sFeedDialogDescription = data.getTxt('look') + ' ' + this.sProductName + '. ' + data.getTxt('until') + this._getDeadLine(oResData) + '. ' + data.getTxt('like') ;
				break;
			default:
		}	
		
		if (sFeedDialogDescription !== '' && !this.bIsAdultCampaign){
			return encodeURI(sFeedDialogDescription);
		} else if (this.bIsAdultCampaign){
			return encodeURI(data.getTxt('until') + ' ' + this._getDeadLine(oResData) + ' ' + data.getTxt('loseIt'));
		} else{
			return '';
		}
	},
		
	/**
	 * Devuelve la imagen necesaria para el compartir de Facebook
	 * En caso de tratarse de una campanya para adultos, el logo de Privalia sera la imagen
	 * @param {Object} data
	 * @param {Object} section
	 */
	_getFeedDialogImage: function (data, section){
		var sFeedDialogPicture = '';
		switch (section) {
			case 'home':		//Fall Through
			case 'shopwindow': 
				var campaign_PK = this.getUrlParamValue('campaign');
				if (campaign_PK !== ''){
					sFeedDialogPicture = "http://" + Country.getIso() + ".privalia.com/front/get/front/get/photo/" + campaign_PK + "_-_images_-_960ximg-esc-open.jpg";
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_getFeedDialogImage: campaign_PK not found');
					}
				}
				break;
			case 'fittingroom':
				if (data.product_images !== undefined) {
					sFeedDialogPicture = "http://" + Country.getIso() + ".privalia.com" + data.product_images.ab1;
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_getFeedDialogImage: data.product_images not found');
					}
				}
				break;
			default:
		}	
		
		if (sFeedDialogPicture !== '' && !this.bIsAdultCampaign){
			return sFeedDialogPicture;
		} else if (this.bIsAdultCampaign){
			return "http://es.privalia.com/front/get/img/logo.png";
		} else{
			return '';
		}
	},
	
	/**
	 * Devuelve el link para Facebook, que corresponde con la ubicacion actual
	 */
	_getFeedDialogLink: function (){
		return document.location;
	},
		
	/**
	 * Devuelve el Nombre del link cuando se comparte en Facebook
	 * @param {Object} data
	 * @param {Object} section
	 */
	_getFeedDialogName: function (data, section){
		var sFeedDialogName = '',
		sCampaignName = '';
		
		if(this.sCampaignName !== ''){
			sCampaignName = this.sCampaignName;
		}
		
		switch (section) {
			case 'home':		//Fall Through
			case 'shopwindow': 
			case 'fittingroom':
				sFeedDialogName = sCampaignName + ' ' + data.getTxt('inPrivalia');
				break;
			default:
		}	
		
		if (sFeedDialogName !== '' && !this.bIsAdultCampaign){
			return sFeedDialogName;
		} else if (this.bIsAdultCampaign){
			return encodeURI(data.getTxt('newCampaign'));
		} else {
			return '';
		}
	},
	
	/**
	 * Asigna un Id de Aplicacion de Facebook segun el pais en el que nos encontremos
	 */
	_getFeedDialogId: function(){
		var nAppId = 123050457758183;
		
		switch (Country.getIso()) {
			case 'es':
				nAppId = this.code_EsAppId;
				break;
			case 'it':
				nAppId = this.code_ItAppId;
				break;
			case 'mex':
				nAppId = this.code_MexAppId;
				break;
			case 'br':
				nAppId = this.code_BrAppId;
				break;
			default:
		}
		
		return nAppId;	
	},
	
	/**
	 * Obtenemos los parametros que han de figurar en el link del FeedDialog
	 * @param {Object} data
	 * @param {Object} section
	 */
	_getFeedDialogParameters: function (data, section){
		var oResData = data.getResData(),
		http = 'http://www.facebook.com/dialog/feed?',
		app_id = 'app_id=' + this._getFeedDialogId() + '&',																							
		link = 'link=' + this._getFeedDialogLink() + this.sFacebookTracking + '&',
		picture = 'picture=' + this._getFeedDialogImage(oResData, section) + '&',
		name = 'name=' + this._getFeedDialogName(data, section) + '&',
		caption = 'caption=' + this._getFeedDialogCaption() + '&',							
		description = 'description=' + this._getFeedDialogDescription(data, section) + '&', 
		display = 'diplay=popup&',	
		redirect = 'redirect_uri=http://www.facebook.com';
		
		return http + app_id + link + picture + name + caption + description + display + redirect;
	},
	
	/**
	 * Devuelve un string con el nombre de usuario mostrado en la cabecera
	 */
	_getMemberName: function(data){
		var sMemberName = encodeURI(data.getTxt('user'));
		
		if(MH.getResData().header_page_data !== undefined){
			sMemberName =  this.trim(MH.getResData().header_page_data.member_name);
		} else{
			if (typeof(DGuardian) != 'undefined') {
			    DGuardian.log('PrivaliaSocial@_getMemberName: MH.getResData().header_page_data not found');
			}
		}

		if (sMemberName !== ''){
			return sMemberName;
		} else {
			return '';
		}
	},
		
	/**
	 * Devuelve un string con el valor del nombre del producto
	 * @param {Object} data
	 * @param {Object} section
	 * @param {Object} i
	 */
	_getProductName: function(data, section, i){
		var sProductName = '';
		switch (section) {
			case 'confirmation':
				if (data.order_products[i] !== undefined) {
					sProductName = data.order_products[i].ordline_description;
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_getProductName: data.order_products[i] not found');
					}
				}
				break;
			default:
		}	
		
		if (sProductName !== ''){
			return sProductName;
		} else {
			return '';
		}
	},
	
	/**
	 * Devuelve un string con la ruta de la imagen del producto
	 * @param {Object} data
	 * @param {Object} section
	 */
	_getProductPicture: function(data, section, i){
		var sProductPicture = '';
		switch (section) {
			case 'fittingroom':
				if (data.product_images !== undefined) {
					sProductPicture = "http://" + Country.getIso() + ".privalia.com" + data.product_images.ab1;
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_getProductPicture: data.product_images not found');
					}
				}
				break;
			case 'confirmation':
				if (data.order_products[i] !== undefined) {
					sProductPicture = "http://" + Country.getIso() + ".privalia.com" + data.order_products[i].prodf_imgpath_ab1;
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_getProductPicture: data.order_products[i] not found');
					}
				}
				break;
			default:
		}	
		
		if (sProductPicture !== ''){
			return sProductPicture;
		} else {
			return '';
		}
	},
	
	/**
	 * Devuelve un string con el precio de venta al socio de Privalia
	 * @param {Object} data
	 * @param {Object} section
	 */
	_getPVS: function (data, section, i){
		var sPVS = '';
		switch (section) {
			case 'fittingroom':
				if (data.product_data !== undefined) {
					sPVS = data.product_data.product_pvs;
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_getPVS: data.product_data not found');
					}
				}
				break;
				case 'confirmation':
				if (data.order_products !== undefined){
					sPVS = data.order_products[i].ordline_price;
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_getPVS: data.order_products not found');
					}
				}
			default:
		}	
		
		if (sPVS !== ''){
			return sPVS;
		} else {
			return '';
		}
	},
	
	/**
	 * Devuelve un string con el precio de venta al publico
	 * @param {Object} data
	 * @param {Object} section
	 */
	_getPVP: function (data, section, i){
		var sPVP = '';
		switch (section) {
			case 'fittingroom':
				if (data.product_data !== undefined) {
					sPVP = data.product_data.product_pvp;
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_getPVP: data.product_data not found');
					}
				}
				break;
			case 'confirmation':
				if (data.order_products !== undefined){
					sPVP = data.order_products[i].prodf_pvp;
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_getPVP: data.order_products not found');
					}
				}
			default:
		}	
		
		if (sPVP !== ''){
			return sPVP;
		} else {
			return '';
		}
	},
	
	/**
	 * Setea las opciones de compartir para el AddThis, segun la seccion
	 * @param {Object} section
	 */
	_getSharingObj: function (data, section){
		var result = {},
		oResData = data.getResData();
		var url = document.location.href;
		if (url.indexOf('#')) {
			url += '/';
		}
		
		switch (section) {
			case 'shopwindow': //fall through
			case 'home':
				this._setCampaignName(oResData, section);
				result = {
					description: this.sCampaignName,
					url: url + this.sTwitterTracking,  
					templates: {
						twitter: data.getTxt('seen') + ' {{description}} {{url}} ' +  data.getTxt('via')
					},
					email_vars: {
						member_name: this._getMemberName(data),
						campaign_name: this.sCampaignName,
						campaign_end: this._getCampaignEnd(oResData),
						campaign_pic: this._getCampaignPicture(oResData, section)
					},
					email_template: Country.getIso() + "-share-campaign"
				};
				break;
			case 'fittingroom':
				this._setCampaignName(oResData, section);
				this._setProductName(oResData, section);
				result = {
					description: this.sCampaignName,
					url: url + this.sTwitterTracking,
					templates: {
						twitter: data.getTxt('love') + ' {{description}} {{url}} ' + data.getTxt('via')
					},
					email_vars: {
						member_name: this._getMemberName(data),
						pvp: this._getPVP (oResData, section),
						pvs: this._getPVS (oResData, section),
						campaign_end: this._getCampaignEnd(oResData),
						campaign_name: this.sCampaignName,
						product_name: this.sProductName,
						brand_pic: this._getBrandPicture (oResData, section),
						product_pic: this._getProductPicture (oResData, section)
					},
					email_template: Country.getIso() + "-share-product"
				};
				break;
			case 'confirmation':
				var result = [];
				this.nOrderLength = oResData.order_products.length;
				
				for(var i = 0; i < this.nOrderLength; i++){
					result[i] = {
						templates: {
							twitter: data.getTxt('bought') + ' {{description}} {{url}} ' + data.getTxt('via')
						},
						email_vars: {
							member_name: this._getMemberName(data),
							pvp: this._getPVP (oResData, section, i),
							pvs: this._getPVS (oResData, section, i),
							campaign_name: this.sCampaignName,
							product_name: this._getProductName(oResData, section, i),
							brand_pic: this._getBrandPicture (oResData, section),
							product_pic: this._getProductPicture (oResData, section, i)
						},
						email_template: Country.getIso() + "-share-confirmation"
					};
				}
				break;
			default:
		}
		return result;
	},
	
	/**
	 * Devuelve el codigo del pais segun el dominio de la web
	 */
	_getUILanguage: function (){
		switch (Country.getIso()){
			case 'mex': //fall through
			case 'es':
				return "es";
				break;
			case 'it':
				return "it";
				break;
			case 'br':
				return "pt";
				break;
			default:
				return "en";
		};
	},
	
	/**
	 * Setea la variable sCampaignName a partir de los datos en el objeto MH
	 */
	_setCampaignName: function (data, section){
		switch (section) {
			case 'home':
			case 'shopwindow':
			case 'fittingroom':
				if (data.breadcrumb_data !== undefined){
					this.sCampaignName = data.breadcrumb_data[0].bread_name;
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_setCampaignName: data.breadcrumb_data[0] not found');
					}
				}
				break;
			case 'confirmation':
				if (data.confirmation_data !== undefined) {
					this.sCampaignName = data.confirmation_data.campaign_name;
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_setCampaignName: data.confirmation_data not found');
					}
				}
				break;
			default:
		}
	},

	/**
	 * Setea la variable sCampaignName a partir de los datos en el objeto MH
	 */
	_setProductName: function (data, section){
		switch (section) {
			case 'fittingroom':
				if(data.breadcrumb_data[3] !== undefined){
					this.sProductName = this.brCleaner(data.breadcrumb_data[3].bread_name);
				}else{
					this.sProductName = this.brCleaner(data.breadcrumb_data[2].bread_name);
				}
				break;
			case 'confirmation':
				if (data.order_products !== undefined){
					this.sProductName = this.brCleaner(data.order_products[0].ordline_description);
				} else {
					if (typeof(DGuardian) != 'undefined') {
					    DGuardian.log('PrivaliaSocial@_setProductName: data.order_products[0] not found');
					}
				}
				break;
			default:
		}
	}

});	
/**
 *  privalia.sponsor.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, 90-privalia.base.js
 * @revision: 	1.0
 */

/**
 * PrivaliaJsonSponsor Common
 * =========================================
 * @requieres:
 * @revision:
 * @modified: 	Dani	(20-01-11)
 */

var PrivaliaJsonSponsor = Class.create(PrivaliaBase, {
	initialize: function($super) {
		$super();

		this.getContactsOpened = false;
		this.idTemporaryContent = "temporary-content";
		this.idRealContent = "real-content";
		this.emailCounter = 8;
		this.auxText = [];
		this.providerContactModal = '';
		this.mgmThanksModal = '';
		this.idContactList = "contacts_data";
		this.idExpressForm = '';

		//MGM
		this.idThanksSection = 'thanks-content';
		this.idMGMHeader = 'mgm-header';

		//version
	   	this.version =				1.1;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaJsonSponsor');

		// Inicializa el metodo para recoger eventos.
		Analytics.basicTracking();
	},

	/**
     * Construye la pagina con los datos pasados por json previamente
     */
    buildPage: function(generate){
        switch (generate) {
            case 'get_providers_data':
                this.generateHtml({
                    pushData: this.pushProviderContacts
                });

                break;

            default:
                this.generateHtml();
        }
    },

	/**
	 * Carga los datos desde una llamada previa Ajax
	 * @param {Object} section - seccion especificada de la pagina
	 */
	getDataFromAjax: function(section) {
		if(section != "") {
			// tipo de getData personalizado
			this._setBuild(section);

			if(this.demo) alert('Esta es la pagina que se va a cachear. Nuevo objeto PJSON()');
			// ocultamos divs a volcar
			this._preinit();
			this.stopLoad(); //Para que no se quede petado si el usuario cierra la modal antes de tiempo
			this._setvData();
			this._init();
		}
		else {
			//por defecto
			this.errorMessage('01');
		}
	},

	/**
     * Get Data personalizado para crear la lista de contactos devuelta por el plug-in
     */
    pushProviderContacts: function(dataJson, index){
        var target = this.getTarget();

		if (target == "contacts_data") {
			//Si el contacto ya es socio, lo indicamos; si no, permitimos que sea anyadido
			if(dataJson.privalia_member == true){
				dataJson.contact_checkbox = "<span class=\"clr-red\">"+ this.auxText[0] +"</span>";
			}else{
				this.emailCounter = ++this.emailCounter;
				dataJson.contact_checkbox = "<input class=\"selectable-contact\" type=\"checkbox\" id=\"email" + this.emailCounter + "\" name=\"email_address[\'" + this.emailCounter + "\']\" value=\"" + dataJson.contact_email +"\" onclick=\"Data.checkboxAction(this);\" />";
			}
        }
        // sumo datos a volcar
        this.addBuilt(dataJson);
    },

	/**
	 * Introduce texto en el array auxiliar
	 * @param {Object} txt
	 */
	setAlreadyContactTxt: function(txt){
		this.auxText[0] = txt;
	},

	/**
	 * Submit Personalizado para el envio de contactos Express
	 * @param {Object} idForm
	 */
	submitExpressContacts: function(idForm){
		this.idExpressForm = idForm;
		this.submit(idForm, this._submitExpressContacts.bind(this));
	},

	/**
	 * Submit Personalizado para el envio de contactos Express en MGM
	 * @param {Object} idForm
	 */
	submitMGMExpressContacts: function(idForm, modal){
		this.idExpressForm = idForm;
		this.mgmThanksModal = modal;
		this.submit(idForm, this._submitMGMExpressContacts.bind(this));
	},

	/**
	 * Submit Personalizado para el envio de contactos en MGM
	 * @param {Object} idForm
	 */
	submitMGMContacts: function(idForm){
		this.submit(idForm, this._submitMGMContacts.bind(this));
	},

	/**
	 * Realizamos un submit para obtener la lista de contactos, personalizando la respuesta
	 * @param {Object} idForm - formulario a enviar
	 * @param {Object} modal - nombre de la modal que abriremos
	 */
	submitProvider: function(idForm, modal) {
		this.providerContactModal = modal;
		this.submit(idForm, this._submitResponseProvider.bind(this));
	},

    /**
     * Envio de la lista de contactos devuelta por el plug-in
	 * @param {Object} response - respuesta AJAX al envio del login de usuario en el proveedor
	 */
    _submitExpressContacts: function(response){
        this.stopTimeout();
        this.parseResponse(response);
        if (this.statusOK()) {
			this.stopLoad();
            // borrar el formulario
			this.clearForm(this.idExpressForm);
			// refrescar los datos
			this.reload();
			// mostrar mensaje de notificacion
			this.notify(this.getResTextcodes());
        }
        else {
			this.stopLoad();
			//Notify en pagina principal y gestion de errores
			this.endSubmitError();
        }
    },

    /**
     * Envio de la lista de contactos devuelta por el plug-in
	 * @param {Object} response - respuesta AJAX al envio del login de usuario en el proveedor
	 */
    _submitMGMExpressContacts: function(response){
        this.stopTimeout();
        this.parseResponse(response);
        if (this.statusOK()) {
			this.stopLoad();
            // cerrar formulario
			this.closeForm();
			// borrar el formulario
			this.clearForm(this.idExpressForm);
			// refrescar los datos
			this.reload();

			// mostrar agradecimiento
            $(this.mgmThanksModal).open();
        }
        else {
			this.stopLoad();
			//Notify en pagina principal y gestion de errores
			this.endSubmitError();
        }
    },

    /**
     * Envio de la lista de contactos devuelta por el plug-in
	 * @param {Object} response - respuesta AJAX al envio del login de usuario en el proveedor
	 */
    _submitMGMContacts: function(response){
        this.stopTimeout();
        this.parseResponse(response);
        if (this.statusOK()) {
			this.stopLoad();
            // cerrar formulario
			this.closeForm();

			// refrescar los datos
			this.reload();

			// mostrar agradecimiento
			this.showThanks();
        }
        else {
			this.stopLoad();
            $(this.providerContactModal).close();
			//Notify en pagina principal y gestion de errores
			this.endSubmitError();
        }
    },

    /**
     * Envio de la lista de contactos devuelta por el plug-in
	 * @param {Object} response - respuesta AJAX al envio del login de usuario en el proveedor
	 */
    _submitResponseProvider: function(response){
        this.parseResponse(response);

        if (this.statusOK()) {
            this.stopLoad();
            this.stopTimeout();
			this.hideLoadingMessage();
			this.showRealContent();

			// Si no es la primera vez que abrimos la modal, activamos el modo reloading
			if (this.getContactsOpened) {
				this.setReloading(true);
			}
			//Realizamos un get data a partir de la respuesta Ajax
			this.getDataFromAjax('get_providers_data');
			// Desactivamos el modo reloading, si no es la primera vez
			if (this.getContactsOpened) {
				this.setReloading(false);
			}
			//Marcamos que la modal ya ha sido cargada
			this.getContactsOpened = true;

			//TODO - Marcos - Eliminar esta parte
			this.disableInvitation();
        }
        else {
			this.stopLoad();
            this.stopTimeout();
            $(this.providerContactModal).close();
			//Notify en pagina principal y gestion de errores
			this.endSubmitError();

        }
    }

});


/**
 * PrivaliaSponsor - Common
 * =========================================
 * @requieres: 	-
 * @revision: 	-
 * @modified: 	Cristina	(17-12-10)
 */

var PrivaliaSponsor = new Class.create(PrivaliaJsonSponsor, {
	initialize: function($super) {
		$super();

		this.idInvitationButton = "buttonInviteContact";
		this.idInfoAbout = "contact-invite-info";
		this.idMoreMailInputs = "extra-line";
		this.idMoreMailLink = "link-more-mails";

		this.idSecondList = "selected-contacts";
		this.idSelectedListWarp = "selected-contact-wrap";
		this.idContactsList = "contacts_data";
		this.s_selectedListHTML = '';
		this.idSubmitProviderBtn =     'submit-provider-btn';
		this.idSubmitProviderBtnWrap = 'submit-provider-btn-wrap';
		this.idFakeSubmitProviderBtn = 'fake-submit-provider-btn';

		this.idModal = 'modalContactInvite';

		this.eraseText = '';

		//version
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaSponsor');
	},

	/**
	 * Gestiona el link de anyadir mas mails
	 */
	addMoreMails: function(){
		$(this.idMoreMailInputs).show();
		$(this.idMoreMailLink).hide();
	},

	/**
	 * Adapta la posicion de la modal de importar contactos una vez cargada
	 */
	adjustModalPosition: function(){
		//En caso de encontrarnos en MGM tendremos que modificar el nombre de la modal
		if($(this.idModal) === null ){
			this.idModal = "modalMGMInvite";
		}

		var originalTop = $(this.idModal).getStyle('top');
		var newTop = originalTop.split("px")[0];
		newTop = (parseInt(newTop) - 170) + "px";

		$(this.idModal).setStyle({
		  top: newTop
		});
	},

	/**
	 * Anyade el contacto dado a la lista de seleccionados
	 * @param {Object} checkbox - input de la lista de contactos
	 */
	addSelectedContact: function(checkbox){
		var built = '';
        var html = '';
        var html = this.s_selectedListHTML;
		var obj = {
			element_delete_link :'',
			selected_id: '',
			selected_name: ''
		};

		//Comprobamos si esta definido el template
        if (html == '') {
			//si no lo esta, cargamos el html que sirve de plantilla; lo borramos del template y lo guardamos pa luego
            html = $(this.idSelectedListWarp).innerHTML;
			this.updateRover(this.idSelectedListWarp,'');
        	this.s_selectedListHTML = html;
		}
        //recupero el html a rellenar y creo el template
        var tpl = new Template(html);

		//Obtengo los datos del checkbox
		//TODO: optimizar el uso del string
		obj.selected_id = "selected-" + checkbox.id.split("email")[1];
		obj.selected_name = checkbox.up(1).childElements()[1].innerHTML;
		obj.element_delete_link = "<a title=\""+ this.eraseText +"\" onclick=\"Data.deselectContact(\'email" + checkbox.id.split("email")[1] + "\',\'selected-" + checkbox.id.split("email")[1] + "\');\" href=\"javascript:;\" >"+ this.eraseText +"</a>";

        //vamos sustituyendo las variables dentro del template
        built += tpl.evaluate(obj);

		//anyadimos la nueva linea a la lista
        $(this.idSelectedListWarp).insert({bottom:built});
	},

	/**
	 * Gestiona la accion a realizar cuando se marca o desmarca un checkbox
	 * @param {Object} checkbox - el checkbox activado/desactivado
	 */
	checkboxAction: function (checkbox){
		//Si lo estamos activando
		if($(checkbox).checked){
			this.selectedListUpdate(checkbox, true);
			// activamos boton y segunda lista; desactivamos info
			this.enableInvitation();
			this.disableInfo();
			this.enableSelectedList();
		}else{
			this.selectedListUpdate(checkbox, false);
			//Si no hay ningun checbox mas activo, mostramos info, desactivamos boton y lista
			if(!this.checkIfSelected()){
				this.enableInfo();
				this.hideInvitation();
				this.disableSelectedList();
			}
		}
	},

	/**
	 * Comprueba si existe un checkbox seleccionado o no
	 */
	checkIfSelected: function (){
		var checkedCounter = 0;
		$$('.checkbox .selectable-contact').each(function(item){
			if (item.checked){
				checkedCounter = ++checkedCounter;
			}
		});

		return (checkedCounter > 0 ? true : false);
	},


	/**
	 * De-seleccionamos un contacto desde la lista de seleccionados
	 * @param {Object} idCheckbox
	 */
	deselectContact: function(idCheckbox, idSelectedLine){
		//desmarcamos el checkbox en la lista de contactos y eliminamos la entrada en la de seleccionados
		$(idCheckbox).checked = false;
		$(idSelectedLine).remove();

		//Si era el último, ocultamos elementos
		if(!this.checkIfSelected()){
			this.enableInfo();
			this.hideInvitation();
			this.disableSelectedList();
		}
	},

	/**
	 * 	Oculta la informacion acerca del importador de contactos
	 */
	disableInfo: function (){
		$(this.idInfoAbout).addClassName("hidden");
	},

	/**
	 * 	Desactiva el boton de Importar contactos
	 */
	disableInvitation: function (){
		$(this.idFakeSubmitProviderBtn).removeClassName("hidden");
		$(this.idSubmitProviderBtnWrap).addClassName("disableButton");
		$(this.idSubmitProviderBtn).addClassName("hidden");
	},

	/**
	 * 	Oculta la lista de seleccionados
	 */
	disableSelectedList: function (){
		$(this.idSecondList).addClassName("hidden");
	},

	/**
	 *	Activa el boton de Importar contactos
	 */
	enableInvitation: function (){
		$(this.idInvitationButton).removeClassName("hidden");
	},

	/**
	 *	Muestra la informacion acerca del importador de contactos
	 */
	enableInfo: function (){
		$(this.idInfoAbout).removeClassName("hidden");
	},

	/**
	 *	Muestra la lista de seleccionados
	 */
	enableSelectedList: function (){
		$(this.idSecondList).removeClassName("hidden");
	},

	/**
	 * 	Oculta el boton de Importar contactos
	 */
	hideInvitation: function (){
		$(this.idInvitationButton).addClassName("hidden");
	},

	/**
	 * Oculta el mensaje de carga de la modal
	 */
	hideLoadingMessage: function(){
		$(this.idTemporaryContent).addClassName("hidden");
		this.adjustModalPosition();
	},

	/**
	 * Oculta el contenido final de la modal
	 */
	hideRealContent: function(){
		$(this.idRealContent).addClassName("hidden");
	},

	/**
	 * Ocultamos el mensaje de agradecimiento en la misma modal
	 */
	hideThanks: function(){
		$(this.idThanksSection).addClassName('hidden');
		$(this.idMGMHeader).removeClassName('hidden');
	},

	/**
	 * Eliminamos el contacto indicado en checkbox de la lista de seleccionados
	 * @param {Object} checkbox
	 */
	removeSelectedContact: function(checkbox){
		var idToRemove = "selected-" + checkbox.id.split("email")[1];
		if (idToRemove !== null){
			$(idToRemove).remove();
		}
	},

	/**
	 * Vuelve a la Configuracion inicial de la modal
	 */
	resetModal: function(){
		this.showLoadingMessage();

		this.hideRealContent();
		this.enableInfo();
		this.hideInvitation();
		if($(this.idThanksSection)!== null){
			this.hideThanks();
		}

		this.disableSelectedList();
		//Limpiamos la lista de seleccionados
		$(this.idSelectedListWarp).update('');

		$(this.idContactsList).removeClassName("jsoned");
		$(this.idContactsList).addClassName("json");
	},

	/**
	 * Gestiona la adicion de contactos a la lista de seleccionados
	 * @param {Object} checkbox - checkbox pulsado
	 * @param {Object} added - accion: anyadir o eliminar
	 */
	selectedListUpdate: function(checkbox, added){
		if (added){
			this.addSelectedContact(checkbox);
		}else{
			this.removeSelectedContact(checkbox);
		}
	},

	/**
	 * Introducimos el copy correspondiente al tag de Eliminar
	 * @param {Object} text
	 */
	setEraseText: function(text){
		this.eraseText = text;
	},

	/**
	 * Muestra el boton de Importar
	 */
	showImportingBtn: function(){
		$(this.idSubmitProviderBtn).removeClassName("hidden");
		$(this.idSubmitProviderBtnWrap).removeClassName("disableButton");
		$(this.idFakeSubmitProviderBtn).addClassName("hidden");
	},

	/**
	 * Muestra el mensaje de carga de la modal
	 */
	showLoadingMessage: function(){
		$(this.idTemporaryContent).removeClassName("hidden");
	},

	/**
	 * Muestra el contenido final de la modal
	 */
	showRealContent: function(){
		$(this.idRealContent).removeClassName("hidden");
	},

	/**
	 * Mostramos el mensaje de agradecimiento en la misma modal
	 */
	showThanks: function(){
		$(this.idThanksSection).removeClassName('hidden');
		$(this.idMGMHeader).addClassName('hidden');
		this.hideRealContent();
	}

});/**
 * PrivaliaTooltip
 * =========================================
 * @requieres: 	-
 * @modified: 	Lucas	(21-06-11)
 */
VERSION_PrivaliaTooltip = 1.4;

var PrivaliaTooltip = Class.create({
	initialize: function(s_id, s_content, o_options) {
		// configurable
		this.b_debug =			false;
		this.s_prefix =			'tip-';

		// internos
		this.b_isInput =		false;
		this.b_positionedOffset = true;
		this.b_opened =			false;
		this.idElement =		s_id;	// id del target	
		this.idTooltip =		this.s_prefix + s_id;
		this.i_positionX =		0;
		this.i_positionY =		0;
		
	   	// opciones por defecto
	   	this.options = Object.extend({
	   		autoClose:	0,				// segundos para auto cierre. 0 significa no se auto-cierra
	   		cssClass:	'tip',			// estilo css utilizado para definir el tooltip
	   		closeBtn:	true,			// tiene un boton de cerrar
	   		duration:	0.3,			// duracion del fading al cerrarse
	   		status:		'info',			// valors posibles: info, error, warning
	   		on:			'click',		// evento observe. puede ser click, focus, mouseover, mouseout, etc.
	   		showNow:	false,			// mostrar el tooltip nada mas creado, o esperar un observer
	   		target:		'r',			// valores posibles: t (top), tr (top-right), r, br, b, bl, l, tl
   			tip:		'l',			// valores posibles: t (top), tr (top-right), r, br, b, bl, l, tl
   			width: 		0,				// ancho del tooltip (string: "230px", "auto"...
   			type:		'text'			// tipo de contenido del tooltip. valores posibles: 
   										// text: texto plano
   										// html: contenido html
	   	}, o_options || {});
	   	
	   	// crear tooltip 
	   	this.create(s_content);
	},
	
	/**
	 * Algoritmo que calcula la posicion del tooltip respecto el documento
	 */
	calculatePosition: function (tip, target) {
		pos = $(this.idElement).cumulativeOffset();
		var scr = {left:0, top:0};
		var p = $(this.idElement).parentNode;
		while (p && p != document.body) {
			p = $(p);
			if (p.getStyle('overflow') == 'hidden') {
				scr.left += p.scrollLeft;
				scr.top += p.scrollTop;
			}
			p = p.parentNode;
		}
		posX = pos.left - scr.left;
		posY = pos.top - scr.top;
		
		switch(tip) {
			case 't':
				switch(target) {
					case 'b':
						this.i_positionX = posX - ($(this.idTooltip).getWidth() / 2) + 10;
						this.i_positionY = posY + 32;
						break;
				}
				break;
		}
	}, 

    /**
	 * Algoritmo que calcula la posicion del tooltip respecto al target
	 */
	calculatePositionOffset: function (tip, target) {
		var padding = 15;
		
		var pos = $(this.idElement).positionedOffset();
		posX = pos.left;
		posY = pos.top;
		
		switch(tip) {
			case 't':
				switch(target) {
					case 'b':
						this.i_positionX = ($(this.idElement).getWidth() / 2) - ($(this.idTooltip).getWidth() / 2);
						this.i_positionY = $(this.idElement).getHeight() + 10;
						break;
				}
				break;

			case 'tr':
				
				switch(target) {

					case 'br':
						this.i_positionX = $(this.idElement).getWidth() - $(this.idTooltip).getWidth();
						this.i_positionY = $(this.idElement).getHeight() + 20;
						break;

					case 'b':
						this.i_positionX = ($(this.idElement).getWidth() / 2) - $(this.idTooltip).getWidth() + padding;
						this.i_positionY = $(this.idElement).getHeight() + 20;
						break;

					case 'bl':
						this.i_positionX = -1 * $(this.idTooltip).getWidth() + padding;
						this.i_positionY = $(this.idElement).getHeight() + 20;
						break;
				}
				break;

			case 'r':
				switch(target) {
					case 'l':
						this.i_positionX = -1 * $(this.idTooltip).getWidth() + posX - padding;
						this.i_positionY = 0; // TODO: calcular posicion
						break;
					}
				break;
				
			case 'b':
				
				switch(target) {
					case 't':
						this.i_positionX = ($(this.idElement).getWidth() / 2) - ($(this.idTooltip).getWidth() / 2);
						this.i_positionY = -1* $(this.idTooltip).getHeight() - 10;
						break;
					
					}
				break;	
				
			case 'bl':
				
				switch(target) {
				
				case 'tl':
					this.i_positionX = 0;
					this.i_positionY = -1* $(this.idTooltip).getHeight() - 20;
					break;
				
				}
				break;
				
			default:
			case 'l':
				switch(target) {
				
					default:
					case 'r':
						this.i_positionX = $(this.idElement).getWidth() + posX + padding;
						this.i_positionY = 0; // TODO: calcular posicion
						break;
					}
				break;
			
			case 'tl':
				
				switch(target) {

					case 'b':
						this.i_positionX = ($(this.idElement).getWidth() / 2) - padding;
						this.i_positionY = $(this.idElement).getHeight() + 20;
						break;
				}
				break;
		}
	},
	
	/**
	 * Cerrar el tooltip
	 */
	close: function() {
		if(!this.isClosed()) {
			this.b_opened = false;
			$(this.idTooltip).fade({
				duration:this.options.duration
			});
		}
	},
	
	/**
	 * Cerrar el tooltip de proximas campanyas
	 * TODO: Este metodo no ha de estar definido en esta clase generica, ya que se trata de algo especifico del escaparate (mike, 20110412)
	 */
	closeTooltipNextCampaigns: function() {
		if(!this.isClosed()) {
			this.b_opened = false;
			$(this.idTooltip).hide();
		}
	},

  /**
	 * Crea el html del tooltip y le carga el contenido
	 */
	create: function(s_content) {
		// el target existe
		if($(this.idElement)) {
			// comprobar si ya se creo un tooltip para este target
			if($(this.idTooltip) === null) {
				var s_cssStyles = this.getCss();
				
				// crear un span para la flecha
				var span = new Element('span', {
					'class': 'pointer'
				});
				
				// crear boton cerrar
				if(this.options.closeBtn) {
					var btnClose = new Element('a', {
						'class': 'close'
					});
					
					$(btnClose).update('cerrar');
					$(btnClose).observe('click', this.close.bind(this));
				}
				
				switch(this.options.type) {
					case 'html':
						this.idTooltip = s_content;
						$(s_content).addClassName(s_cssStyles);
						
						$(s_content).insert({
							bottom: span
						});
						
						if(this.options.closeBtn) {
							$(s_content).insert({
								bottom: btnClose
							});
						}
						
						break;
					case 'text':
					default:
						// no existe, creamos el tooltip
						
						// crear elemento DOM para tooltip
						var tip = new Element('div', {
							'id':		this.idTooltip,
							'class': 	s_cssStyles,
							'style':	'display:none'
						});

						// cargar contenido
						tip = this.setContent(tip, s_content);
						
						$(tip).insert({
							bottom: span
						});
						
						if(this.options.closeBtn) {
							$(tip).insert({
								bottom: btnClose
							});
						}
						break;
				}
				
				
				// Si el referente es un input, hay variaciones:
				if(this.isInput()) {
					// ponemos position:relative al elemento contenedor, no al mismo input
					var v_ancestors = $(this.idElement).ancestors();
					if(Object.isArray(v_ancestors) && v_ancestors.size() > 0) {
						try {
							$(v_ancestors[0].identify()).relativize();
						}
						catch(e) {
							if(typeof(DGuardian) != 'undefined') {
								DGuardian.warning('PrivaliaTooltip.create@ Target es Input. Error al relativizar: ' + e);
							}
						}
					}
					
					// lo colocamos despues del elemento, debajo (dentro del input no se puede)
					$(this.idElement).insert({
						after: tip
					});
				}
				else {
					// aplicar al elemento referente position:relative
					try {
						$(this.idElement).relativize();
					}
					catch(e) {
						if(typeof(DGuardian) != 'undefined') {
							DGuardian.warning('PrivaliaTooltip.create@ Target es Input. Error al relativizar: ' + e);
						}
					}	
						
					
					// lo colocamos dentro del elemento, pero al final
					$(this.idElement).insert({
						bottom: tip
					});
				}
				
				if(this.options.showNow) { //comprueba si se carga inmediatamente
					this.observeElement();
				}

				// comprueba si se tiene que cerrar automaticamente
				$(this.idElement).observe(this.options.on, this.autoCloseEvent.bind(this));
				
				
				if(this.b_debug) {
					msg = 'nuevo tooltip para: ' + this.idElement;
					if (window.console && window.console.firebug) {
						console.log(msg);
					}
					else {
						alert(msg);
					}
				}
			}
			else {
				if(this.b_debug) {
					msg = 'tooltip ya existe para: ' + this.idElement;
					if (window.console && window.console.firebug) {
						console.log(msg);
					}
					else {
						alert(msg);
					}
				}
				
				switch(this.options.type) {
					case 'html':
						
						break;
					case 'text':
					default:
						this._updateTooltip(s_content);
						break;
				}
				
				if(this.b_debug) {
					msg = 'actualizar contenido: ' + s_content;
					if (window.console && window.console.firebug) {
						console.log(msg);
					}
					else {
						alert(msg);
					}
				}
				
				this.open();
			}
		}
		else {
			if(typeof(DGuardian) != 'undefined') {
				DGuardian.warning('PrivaliaTooltip.create@ No existe el ID elemento: ' + this.idElement);
			}
		}
	},
	/**
	 *  Cierra el tooltip despues "autoClose" segundos desde el evento asociado 
	 */
	autoCloseEvent: function() {
		if(this.options.autoClose > 0) {
			window.setTimeout(this.close.bind(this), this.options.autoClose * 1000);
		}
		this.observeElement();
	},
	
	/**
	 * Devuelve el conjunto de estilos css para formar el tooltip
	 */
	getCss: function () {
		var s_cssStyles = this.options.cssClass + ' ' + this.s_prefix + this.options.tip + ' ' + this.s_prefix + this.options.status;
		return s_cssStyles;
	},
	
	/**
	 * Comprueba si el tooltip esta cerrado
	 */
	isClosed: function () {
		return ($(this.idTooltip).getStyle('display') == 'none');
	},
	
	/**
	 * Comprueba si el target es un input
	 */
	isInput: function () {
		if($(this.idElement).inspect().indexOf('input') > 0 || $(this.idElement).inspect().indexOf('select') > 0) {
			this.b_isInput = true;
		}
		else {
			this.b_isInput = false;
		}
		
		return this.b_isInput;
	},
	
	/**
	   * Algoritmo que calcula la posicion del tooltip respecto al target para proximas campanyas
	   * TODO: Este metodo no ha de estar definido en esta clase generica, ya que se trata de algo especifico del escaparate (mike, 20110412)
	   */
	  nextCampaignsTooltipPosition: function (tip, target) {
		    var padding = 15;

		    var pos = $(this.idElement).positionedOffset();
		    posX = pos.left;
		    posY = pos.top;

		    switch(tip) {
		      case 'l':
		        switch(target) {
		        case 'b':
			          this.i_positionX = ($(this.idElement).getWidth()) + 50;
			          // si es una campaña de fan shop
			          if($(this.idElement).hasClassName('fanshop-campaign')){
			        	  this.i_positionY = posY + 10;
			          }
			          else{
			        	  this.i_positionY = posY - 5;
			          }
			          break;
		        }
		        break;
		    }
	  },
	
	/**
	 * Calcula la posicion del target para posicionar el tooltip, y lo muestra (o lo oculta)
	 */
	observeElement: function(evt) {
		if(this.isClosed() && this.idElement!= '') {
			if(this.i_positionX == 0 && this.i_positionY == 0) {
				this.calculatePositionOffset(this.options.tip, this.options.target);
			}
			
			this.positionize();
			
			if(this.isClosed()) {
				this.open();
			}
			else {
				this.close();
			}
		}
	},
	
	/**
	 * abre el tooltip
	 */
	open: function() {
		if(this.isClosed()) {
			this.b_opened = true;
			$(this.idTooltip).appear({duration:0.1});
		}
	},
	
	positionize: function() {
		$(this.idTooltip).setStyle({
			top: this.i_positionY + 'px',
			left: this.i_positionX + 'px'
		})
		if (this.options.width) {
			$(this.idTooltip).setStyle({
				width: this.options.width
			})		
		}
		
		if(this.b_debug) {
			msg = this.idElement + ' --> ' + this.i_positionY + ', ' + this.i_positionX;
			if (window.console && window.console.firebug) {
				console.log(msg);
			}
			else {
				alert(msg);
			}
		}
	},
	
	/**
	 * carga el contenido
	 */
	setContent: function (tip, content) {
		switch(this.options.type) {
			case 'text':
			default:
				content = '<div id="' + this.idTooltip + 'Inner">' + content + '</div>';
				
				tip.update(content);
				break;
		}
		
		return tip;
	},
	
	/**
	 * Posicionar manualmente el tooltip
	 */
	setPosition: function (x, y) {
		$(this.idTooltip).setStyle({
			top: y + 'px',
			left: x + 'px'
		})
	},
	
	/**
	 * Posicionar y mostrar tooltip
	 */
	show: function (target) {
		this.b_positionedOffset = false;
		this._setIdElement(target);
		this.calculatePosition(this.options.tip, this.options.target);
		this.positionize();
		this.open();
	},
	
	/**
	 * TODO: Este metodo no ha de estar definido en esta clase generica, ya que se trata de algo especifico del escaparate (mike, 20110412)
	 * Aparte, es igual que el metodo show() !!
	 */
    showNextCampaigns: function (target) {
    	this.b_positionedOffset = false;
    	this._setIdElement(target);
    	this.nextCampaignsTooltipPosition(this.options.tip, this.options.target);
    	this.positionize();
    	this.open();
    },

    /**
     * Muestra el tooltip de proximas campanyas
     * TODO: Este metodo no ha de estar definido en esta clase generica, ya que se trata de algo especifico del escaparate (mike, 20110412)
  	 */
    showTooltipNextCampaigns: function(){
	  $(this.idTooltip).show();
    },

    /**
	 * Setear id del target
	 */
	_setIdElement: function (id) {
		this.idElement = id;
	},
    
    /**
     * Actualiza el contenido del tooltip
     */
	_updateContent: function (s_content) {
		var id = this.idTooltip + 'Inner';
		$(id).update(s_content);
	},
	
	/**
	 * Aplica CSS y actualiza contenido
	 */
	_updateTooltip: function (s_content) {
		var css = this.getCss();
		var id = this.idTooltip + 'Inner';

		$(this.idTooltip).className = '';
		$(this.idTooltip).addClassName(css);
		
		this._updateContent(s_content);
	}
});/**
 * PrivaliaWebservice - Common
 * =========================================
 * @modified: 	Mike (28-04-11)
 */
var PrivaliaWebservice = Class.create(PrivaliaBase, {
	initialize: function($super) {
		$super();

		this.b_IOLocked =			false;				// cerrar cualquier comunicacion I/O de terceros
		//version
		this.version =				2.0;				//modificar version al crear un nuevo metodo
		this.setVersion(this.version, 'PrivaliaWebservice');
	},
	/**
	 * esta cerado el permiso I/O de terceros
	 */
	locked: function() {
		return this.b_IOLocked;
	},
	/**
	 * setear permiso I/O
	 */
	setLocked: function(b_locked) {
		this.b_IOLocked = b_locked;
	}
});
/**
 * Privalia Google Website Optimizer - Common
 * =========================================
 * @modified: 	Mike (23-05-11)
 */
var PrivaliaGWO = Class.create(PrivaliaWebservice, {
	initialize: function($super, s_idExperiment, s_name, i_numVersions, b_autoExec) {
		$super();
		// config
		this.debug =				true; 				// DESARROLLO!!! false en produccion
		// interno
		this.b_autoExec =			true;				// por defecto ejecutamos control script al inicio
		this.id =					s_idExperiment;		// id del experimento (GWO)
		this.s_name =				s_name;				// nombre/alias del experimento
		this.versionLoaded =		-1;					// version cargada (obtenida del GWO)
		this.versions =				i_numVersions;		// numero de versiones que se prueba en el experimento
		this.version =				1.1;
		this.setVersion(this.version, 'PrivaliaGWO');
		if(arguments.length > 1) {
			this.b_autoExec = b_autoExec;
		}
		if(this.b_autoExec) {
			this.controlScript();
		}
	},
	checkExperiment: function (token) {
		var b_valid = (token === this.id);
		// reportar dguardian
	},
	/**
	 * Hay que ejecutar este script al inicio de la pagina
	 * GWO external script
	 */
	controlScript: function() {
		if(!this.locked()) {
			var s_key = this.id;
			if(s_key != '') {
				// GWO SCRIPT - start
				(function(){var k= s_key,d=document,l=d.location,c=d.cookie;function f(n){
					if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.indexOf(';',i);return escape(c.substring(i+n.
							length+1,j<0?c.length:j))}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
							d.write('<sc'+'ript src="'+
									'http'+(l.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com'
									+'/siteopt.js?v=1&utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='
									+new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
									'" type="text/javascript" charset="utf-8"></sc'+'ript>')})();
				// GWO SCRIPT - end
			}
			else {
				this.error = true;
				if(typeof(DGuardian) != 'undefined') {
					DGuardian.log('Falta ID del GWO');
				}
			}
		}
	},
	/**
	 * Ejectuar el experimento test AB, pasando la version que hay que mostrar
	 */
	launch: function (i_version) {
		if(!this.error) {
			this.setVersionLoaded(i_version);
			this.setExperimentVersion(i_version, this.versions);
		}
	},
	/**
	 * eliminamos todos los bloques sobrantes que no correspondan con la version correcta
	 */
	removeVersions: function(i_remVersion, i_currentVersion){
		$$('.js-'+this.s_name+i_remVersion).each(function(item){
			if(!item.hasClassName('js-'+this.s_name+i_currentVersion)){
				item.remove();
			}
		}, this);
	},
	/**
	 * marcamos la pagina con la clase css correspondiente de la version y eliminamos todos los bloques sobrantes pasandole como parametros la version correcta y el numero de versiones
	 */
	setExperimentVersion: function(i_currentVersion, i_numOfVersions){
		// nos aseguramos que recibimos los dos parametros
		// y que el currentVersion sea un entero > 0
		if(i_currentVersion != null && i_numOfVersions != null && this.isInteger(i_currentVersion) && i_currentVersion > 0) {
			css = this.s_name+'-v'+i_currentVersion;
			//anyadimos la clase css que marca la version de la pagina
			$('page').addClassName(css);
			// eliminamos las otras versiones
			for (i= 0; i <= i_numOfVersions; i++) {
				if(i != i_currentVersion){
					this.removeVersions(i, i_currentVersion);
				}
			}
		}
	},
	setVersionLoaded: function(i) {
		this.versionLoaded = i;
	},
	/**
	 * Hay que ejecutar este script al final de la pagina
	 * GWO external script
	 */
	trackScript: function (_gaq) {
		if(this.id != '' && this.versionLoaded >= 0) {
			// GWO SCRIPT - start
			_gaq.push(['gwo._setAccount', Country.getKeyGWO()],
				['gwo._setDomainName', '.' + Country.getDomain()],
				['gwo._setAllowAnchor', true],
				['gwo._setCampaignCookieTimeout',0],
				['gwo._trackPageview', '/' + this.id + '/test']);
			_gaq.push(['_setCustomVar', 5, 'Test', '' + this.versionLoaded, 2]);
			// GWO SCRIPT - end
		}
		return _gaq;
	},
	/**
	 * Ejecutamos el script de conversion/exito
	 */
	trackScriptGoal: function () {
		if(this.id != '') {
			 _gaq.push(['gwo._trackPageview', '/' + this.id + '/goal']);
		}
	}
});
//GWO SCRIPT - start
function utmx_section(){}
function utmx(){}
//GWO SCRIPT - end

/**
 * PrivaliaWebservice - Common
 * =========================================
 * @modified: 	Edu (23-02-11)
 */
var PrivaliaStrongmail = Class.create(PrivaliaWebservice, {
	initialize: function($super) {
		$super();

		this.title =			'';		//variable para gestionar el <title>

		//version
		this.version =				1.0;				//modificar version al crear un nuevo metodo
		this.setVersion(this.version, 'PrivaliaStrongmail');
	},


	/**
	 * Compartir con API de StrongMail
	 * @param sharingType: facebook(default), twitter, email
	 * @param idPhoto
	 * @param idTitle
	 * @param urlPage
	 */
	shareMe: function (sharingType, idPhoto, idTitle, urlPage) {
		// por defecto se comparte en facebook
		if(sharingType != 'facebook' && sharingType != 'twitter' && sharingType != 'email'){
			var sharingType = "facebook";
		}

		// pagina por defecto es microsites
		if(!urlPage){
			var urlPage = this.url_microsites;
		}

		// asigna la foto
		this.setPhoto(idPhoto);

		// asigna el title
		this.setTitle(idTitle);

		// llamamos a la API
		if ( typeof(pmi_displayPanel) != 'undefined' ) {
			pmi_displayPanel(urlPage,'',{defaultSharingMethod : sharingType });
		}

		//seteamos el title
		this.title = document.getElementsByTagName('title')[0];
		this.title.innerHTML = 'Privalia';
	},


	/**
	 * Asigna la foto a compartir
	 */
	setPhoto: function (divPhoto){

		var urlPhoto = $(divPhoto).innerHTML;

		if(!urlPhoto){
			var urlPhoto = "http://es.img.privalia.com/daily/assets/logo-privalia.jpg";
		}

		var link = document.createElement('link');
		link.rel = 'image_src';
		link.href = urlPhoto;
		document.getElementsByTagName('head')[0].appendChild(link);
	},

	/**
	 * Asigna el titulo a compartir
	 */
	setTitle: function (divTitle){

		this.title = document.getElementsByTagName('title')[0];

		var titlePage = $(divTitle).innerHTML;

		if(titlePage){
			switch(Country.getIso()){
			case 'es':
				titlePage = titlePage + ' en Privalia'; break;
			case 'it':
				titlePage = titlePage + ' in Privalia';	break;
			case 'mex':
				titlePage = titlePage + ' en Privalia';	break;
			case 'br':
				titlePage = titlePage + ' em Privalia';	break;
			}

			this.title.innerHTML = titlePage;
		}

	}
});

/**
 * PrivaliaRetargeting - Common
 * =========================================
 * @modified: 	Ruben (29-04-11)
 */
var PrivaliaRetargeting = Class.create(PrivaliaWebservice, {
	initialize: function($super) {
		$super();

		this.version =				1.0;
		this.setVersion(this.version, 'PrivaliaRetargeting');
	},

	/**
	 * Inserta la imagen de las conversiones de Google
	 */
	insertConversionImage: function (){

		switch(Country.getIso()){
		case 'es':
			var countrySrc = 'http://www.googleadservices.com/pagead/conversion/1055651169/?label=m2LHCNeYjAIQ4eqv9wM&amp;guid=ON&amp;script=0'; break;
		case 'it':
			var countrySrc = 'http://www.googleadservices.com/pagead/conversion/1052422201/?label=6sTOCLfMnwIQueDq9QM&amp;guid=ON&amp;script=0'; break;
		case 'mex':
			var countrySrc = 'http://www.googleadservices.com/pagead/conversion/1028105126/?label=dqtTCMaplwIQpsee6gM&amp;guid=ON&amp;script=0'; break;
		case 'br':
			var countrySrc = 'http://www.googleadservices.com/pagead/conversion/1038160146/?label=r3MLCIjJbBCSooTvAw&amp;guid=ON&amp;script=0'; break;
		}

		var img = new Element('img', {height: '1', width: '1', style: 'border-style: none;', alt: '', src: countrySrc});

		$('divBody').insert({
			bottom: img
		});
	}
});/**
 *  privalia.zoom.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js
 * @revision: 	1.0
 */

/**
 * PrivaliaZoom - Common
 * =========================================
 * requieres: 	privalia.json.microsites.js, swfobject.js
 * @revision: 	-
 * @modified: 	Cristina	(17-12-10)
 */
var PrivaliaZoom = new Class.create(PrivaliaMicrositesFittingroom, {
	initialize: function($super) {
		$super();

		this.errId =			'25';
		this.modal =			'';			// guardaremos en el objeto el modal que abre el zoom

		this.prefixContainer =	'contenidoFlash_contenedorFlash';	// prefijo de los divs que contienen cada zoom
		
		//version 
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaZoom');
	},

	/**
	 * Construye la pagina con los datos pasados por json previamente
	 */
	buildPage: function(generate) {
		switch(generate) {
			case 'zoom': default:
				this.generateHtml();
				// Generamos el flash para cada imagen que queremos zoomear
				this.initPhotos();
				// Mostramos por defecto la primera imagen
				this.showPhoto('contenedorFlash1');
				break;
		}
	},

	/**
	 * Cierra el modal del zoom
	 */
	close: function () {
		this.modal.close();
	},

	/**
	 * Inicializa el Flash zoom de la imagen
	 */
	embedFlash: function (object, width, height, id_contenedor) {
		if (Prototype.Browser.WebKit){
			var params={bgcolor:"#000000" , wmode:"opaque"};  // Se necesita wmode:opaque para evitar problemas de visualizacion del flash en un modal en Chrome
		}
		else{
			var params={bgcolor:"#000000"};
		}
		swfobject.embedSWF("/front/get/swf/zoom.swf", id_contenedor, width, height, "9.0.0", "/front/get/swf/expressInstall.swf", object, params);
	},

	/**
	 * Generamos el flash para cada imagen que queremos zoomear
	 */
	initPhotos: function () {
		var vPhotos = this.getResData().images_data;

		vPhotos.each(function(photo, index) {
			this.embedFlash({
					urlFoto: 		photo.urlFoto,
					widthFoto: 		photo.widthFoto,
					heightFoto: 	photo.heightFoto,
					urlThumb: 		photo.urlThumb,
					widthThumb: 	photo.widthThumb,
					heightThumb: 	photo.heightThumb,
					widthBig: 		photo.widthBig,
					heightBig: 		photo.heightBig
				}, 423, 510, this.prefixContainer + (index+1));

		}, this);
	},

	/**
	 * Abre el modal del zoom
	 */
	open: function () {
        this.modal.open();
	},

	/**
	 * Mostramos el zoom de una foto.
	 * Oculta todos los zooms y luego muestra el que queremos
	 */
	showPhoto: function (idThumb) {
		
		var idContenedor = idThumb;
		if($(idContenedor) !== null){
			if(idContenedor.substring(0,2) == "tn") {
				idContenedor = idThumb.substring(2);
			}
		}

		if(idThumb != "") {
			// ocultamos todos
			$$('.zoomPhoto').each(function(item) {
				$(item).hide();
			});

			// mostramos el adecuado (si es Firefox no usamos animación)
			if ($(idContenedor) !== null) {
				$(idContenedor).show();
			}
		}
		else {
			this.errorMessage('01');
		}
	},

	/**
	 * Guardar el modal que abre el zoom en el objeto
	 */
	setModal: function (modal) {
		this.modal = modal;
	}
});/**
 *  privalia.reopenorder.js - Common
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js
 * @revision: 	1.0
 */

/**
 * ProcessReopenOrder - Common
 * =========================================
 * @version:	-
 * @modified: 	Cristina	(16-5-11)
 */
var ProcessReopenOrder = Class.create(PrivaliaBase, {
	initialize: function($super) {
		$super();

		this.errId =				'91';
		this.idForm =				'';

		this.i_campaignPK =			0;
		this.i_currentCampaignPK =	0;
		this.i_reopenedCampaignPK =	0;
		this.i_reopenedOrderPK =	0;
		this.i_totalOrders =		0;				// numero de pedidos reabiertos
		
		this.code_noReopen 	  =  	"msg0200030";	// error msg0200030: el pedido no puede ser reabierto porque ya se tiene un pedido abierto de otra campanya
		this.code_noReopenCart = 	"msg0150025";	// error msg0250025: el pedido no puede ser reabierto porque tiene productos en el carrito de otra campanya

		this.total =				0;				// numero de pedidos reabiertos
		this.orderPK =				'';
		this.page =					'';
		this.b_canReopen =			false;
		this.b_reopened =			false;
		this.reopened =				false;
		this.s_mode =				'';
		this.s_orderPK =			0;
		
		this.idNewOrderBtn =		'new-order-btn';
		this.idReopenForm =			'';
		
		//version 
	   	this.version =				1.6;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'ProcessReopenOrder');
	},
	
	/**
	 * Anyadimos un producto al carrito
	 * @param {Object} i_itemsCart
	 * @param {Object} mdlOrdersReopen
	 * @param {Object} mdlReopenOther
	 * @param {Object} form
	 */
	addToCart: function (i_itemsCart, mdlOrdersReopen, mdlReopenOther, form) {
		
		//el cuarto argumento del metodo addToCart es variable, por lo que se controla con el if el parametro que se le pasa
		//si hay se lo asigna al atributo y si no hay coge el que tiene guardado
		if(arguments.length == 4){
			this.idReopenForm = form;
		}
				
		if(i_itemsCart == 0) {
			if(!this.checkIfReopened()) {
				// Comprobar si se puede reabrir un pedido
				if(this.getTotalOrdersToReopen() > 0) {
					// seteamos el formulario en el boton, solucion poco elegante?
					this.setNewOrderBtn(this.idReopenForm);
					
					// genera el listado de pedidos a reabrir
					mdlOrdersReopen.open();
				}
				else {
					addToCart(this.idReopenForm);
				}
			}
			else {
				if(!this.checkIfSameCampaign()) {
					this.setModalOtherReopened();
					mdlReopenOther.open();
				}
				else {
					addToCart(this.idReopenForm);
				}
			}
		}
		else {
			if(!this.checkIfSameCampaign()) {
				if(!this.checkIfReopened()) {
					addToCart(this.idReopenForm);
				}
				else {
					this.setModalOtherReopened();
					mdlReopenOther.open();
				}
			}
			else {
				addToCart(this.idReopenForm);
			}
		}
	},

	/**
	 * Construye la pagina con los datos pasados por json previamente
	 */
	buildPage: function(generate) {
		switch(generate) {
			// listado de pedidos que se pueden reabrir
			case 'reopenOrders':
				if(Object.isArray(this.getResData().orders_data)){
					this.setTotalOrdersToReopen(this.getResData().orders_data.length)
				}
				if(this.getTotalOrdersToReopen() > 0) {
					this.generateHtml();
					this.setModalReopenOrders();
				}
				break;
			default: 
				this.generateHtml();
		}
	},
	
	/**
	 * Reabre el pedido orderPK
	 */
	callReopenOrder: function(orderPK, onComplete) {
		var url = '/myorder/reopen';

		if(orderPK != '') {
			// enviamos orderPK para reabrir el pedido
			new Ajax.Request(url, {
				parameters: 'order=' + orderPK,
				onComplete: onComplete
			});
		}
	},

	/**
	 * Comprobar si se esta reabriendo el pedido mediante el i_reopenedOrderPK
	 * Esto lo obtiene de los datos de la cesta
	 */
	checkIfReopened: function (i_reopenedOrderPK) {
		if(arguments.length == 1) {
			this.i_reopenedOrderPK = i_reopenedOrderPK;
		}
		else {
			if(this.i_reopenedOrderPK === 0) {
				this.b_reopened = false;
			}
			else {
				this.b_reopened = true;
			}
		}
		
		return this.b_reopened;
	},
	
	/**
	 * Comprueba si el producto pertenece a la misma campanya o no, para ver si se puede reabrir
	 */
	checkIfSameCampaign: function () {
		if(this.i_reopenedCampaignPK !== 0) {
			if(this.i_reopenedCampaignPK == this.i_currentCampaignPK) {
				this.b_canReopen = true;
			}
			else {
				this.b_canReopen = false;
			}
		}
		else {
			// no tenemos nada en la cesta. en principio puede reabrir un pedido (si es que tiene pedidos por reabrir)
			this.b_canReopen = true;
		}
		
		return this.b_canReopen;
	},
	
	/**
	 * Comprobar si ya habia otro pedido reabierto de otra campanya
	 * */
	checkOtherReopened: function (campaignPK1, campaignPK2, campaignNamePK) {
		var theSame = false;

		if(campaignPK1 != campaignPK2) {
			// le pasamos al modal el numero de campanya y el nombre
			this.campaingCart = campaignPK2;
			$('campaignPK_reopen').update(this.campaingCart);

			this.campaingNameCart = campaignNamePK;
			$('campaignPK_name').update(this.campaingNameCart);

			// abrimos modal
			this.modalOtherReopened.open();
		}
	},
	
	/**
	 * Detectar si la pagina que hemos cargado esta relacionado con el proceso de reabrir pedido.
	 * Las paginas posibles son:
	 * - home de campana (home)
	 * - detalle de producto (fittingroom)
	 * - detalle de pedido (orderview)
	 * - proceso de compra (summary)
	 */
	checkReopenCase: function () {
		var s_reopenCase = '';
		var v_url = this.getWebSections();
		
		s_reopenCase = this._checkPage(v_url, 'fittingroom');
		if(s_reopenCase == '') {
			s_reopenCase = this._checkPage(v_url, 'home');
		}
		if(s_reopenCase == '') {
			s_reopenCase = this._checkPage(v_url, 'shopwindow');
		}
		if(s_reopenCase == '') {
			s_reopenCase = this._checkPage(v_url, 'summary');
		}
		if(s_reopenCase == '') {
			s_reopenCase = this._checkPage(v_url, 'orderview');
		}
		if(s_reopenCase == '') {
			s_reopenCase = this._checkPage(v_url, 'confirmation');
		}
		
		if(this.debug) {
			if (window.console && window.console.firebug) {
				console.log('PrivaliaMenuheader.buildPage(): Reopen Case [' + s_reopenCase + ']');
			}
			else {
				//alert('PrivaliaMenuheader.buildPage(): Reopen Case [' + s_reopenCase + ']');
			}
		}

		return s_reopenCase;
	},
	
	/**
	 * Comprobar si tiene pedidos a reabrir
	 */
	getTotalOrdersToReopen: function () {
		return this.i_totalOrders;
	},
	
	/**
	 * Guardar datos del pedido reabierto y configura la pagina segun el caso
	 */
	init: function(s_reopenCase, i_reopenedOrderPK, i_reopenedCampaignPK) {
		// guardamos PKs
		this.i_reopenedOrderPK = 	i_reopenedOrderPK;
		this.i_reopenedCampaignPK = i_reopenedCampaignPK;
		
		// configurar la pagina segun el caso
		this.setReopenMode(s_reopenCase);
	},
	
	/**
	 * Comprobar si se puede reabrir
	 */
	getCanReopen: function () {
		return this.b_canReopen;
	},

	/**
	 * Carga una lista de pedidos relacionados que puede reabrir de la misma campanya
	 * Hace un getData()
	 */
	loadOrdersCanReopen: function () {
		if(this.i_currentCampaignPK !== 0) {
			var url = '/myaccount/getOrdersToReopen/campaign/' + this.i_currentCampaignPK;
			
			this.setShowLoad(false);
			
            Event.observe(window, 'load', (function() {
            	this.setCssJson("jsonReopenOrders");
            	this.getData(url, 'reopenOrders');
            }).bind(this));
		}
	},
	
	resetData: function () {
		this.i_reopenedOrderPK = 	0;
		this.i_campaignPK =			0;
		this.i_reopenedCampaignPK =	0;
	},
	
	/**
	 * Callback del submitReopenOrder(). Si se ha reabierto el pedido, mostrar mensaje
	 */
	responseReopenOrder: function (response) {
		this.parseResponse(response);
		var code_reOpenErr = this.getResTextcodes();

		if(this.statusOK()) {
			// estamos en detalle de pedido, mostramos el modal de exito
			if(this.s_mode == 'orderview') {
				this.modalReopen.open();
			}
			else {
				this.modalReopen.close();
			}
		}
		else {
			if (code_reOpenErr == this.code_noReopen) {
				// si ya tiene un pedido abierto de otra campanya lanza el modal
				this.modalOtherReopened.open();
				this.setModalOtherReopened(); // muestra el nombre de la campanya el id de la order
			}
			else if (code_reOpenErr == this.code_noReopenCart) {
				// si ya tiene un producto anyadido en el carrito de otra campanya lanza el error
				this.notify(this.getResTextcodes());
			}
			else {
				// si se produce otro tipo de error...
				this.notify(this.getResTextcodes());
			}
		}
	},

	/**
	 * Callback del submitReopenOrder(). Si se ha reabierto el pedido, mostrar mensaje
	 */
	responseReopenOrderAddProduct: function (response) {
		this.parseResponse(response);

		var code_reOpenErr = this.getResTextcodes();

		if(this.statusOK()) {
			addToCart(this.idReopenForm);
			this.modalReopen.close();
		}
		else {
			if (code_reOpenErr == this.code_noReopen) {
				// si ya tiene un pedido abierto de otra campanya lanza el modal
				this.modalOtherReopened.open();
				this.setModalOtherReopened(); // muestra el nombre de la campanya el id de la order
			}
			else if (code_reOpenErr == this.code_noReopenCart) {
				// si ya tiene un producto anyadido en el carrito de otra campanya lanza el error
				this.notify(this.getResTextcodes());
			}
			else {
				// si se produce otro tipo de error...
				this.notify(this.getResTextcodes());
			}

		}
	},
	
	/**
	 * Selecciona un pedido a reabrir del listado, habilitamos el boton y guardamos el orderPK en un input hidden
	 * en detalle de producto (fittingroom.body.tpl)
	 */
	selectOrder: function (input) {
		var orderPK = '';
		var id = $(input).identify();
		var v_tmp = id.split("-");
		if(v_tmp.length > 2) {
			orderPK = v_tmp[2];
		}
		if(orderPK != '') {
			if($('divReopenBtn').hasClassName('disableButton')) {
				$('divReopenBtn').removeClassName('disableButton');
			}
			$('radio-order').value = orderPK;
		}
	},
	
	/**
	 * Seteamos el formulario en el boton de nuevo pedido
	 * @param {Object} form
	 */
	setNewOrderBtn: function(form){
		$(this.idNewOrderBtn).observe('click', (function(){
			addToCart(form); 
			modalReopen.close();
		})
		);
	},
		
	/**
	 * Obtiene el nombre de la campanya y el id del pedido reabierto
	 */
	setModalOtherReopened: function () {
		var campaingCart = MH.getReopenedCampaignPK();
		$('campaignPK_reopen').update(campaingCart);
		
		var campaingNameCart = MH.getReopenedCampaignName();
		$('campaignPK_name').update(campaingNameCart);
	},

	/**
	 * Tras generar la lista de pedidos a reabrir, limamos el modal
	 * seteamos el total de pedidos a reabrir
	 */
	setModalReopenOrders: function () {
		this.total = '';
		// total de pedidos a reabrir
		this.total = this.getResData().orders_data.size();
		if($('num_reopen_orders')!== null){
			$('num_reopen_orders').update(this.total);
		}
	},
	
	/**
	 * Comprobar si se ha reabierto
	 */
	setReopened: function (b_reopened) {
		this.b_reopened = b_reopened;
	},

	/**
	 * Preparacion especifica de cada pagina para mostrar cosas de reabrir pedido
	 */
	setReopenMode: function (mode) {
		this.s_mode = mode;
			
		switch(mode) {
			case 'fittingroom':
				this.i_currentCampaignPK = 	this.getUrlParamValue('campaign');
				
				// Comprobar si hay un pedido reabierto
				if(!this.checkIfReopened()) {
					// genera el listado de pedidos a reabrir
					this.loadOrdersCanReopen();
				}
				break;
				
			case 'shopwindow':
				this.i_currentCampaignPK = 	this.getUrlParamValue('campaign');
				
				// Comprobar si hay un pedido reabierto
				if(!this.checkIfReopened()) {
					// genera el listado de pedidos a reabrir
					this.loadOrdersCanReopen();
				}
				break;

			case 'summary':
				if(this.checkIfReopened()) {
					// mostrar el mensaje de "estas reabriendo el pedido XXX" en el summary
					$('reopen-order').show();
					$('reopenOrderPK').update(this.i_reopenedOrderPK);
					 Cufon.replace('#reopen-order .cufon');
	
					 // ocultar botones para anadir/cambiar/eliminar la direccion de entrega. tb ocultar los radiobuttons
					 $$('#delivery_addresses input', '#delivery_addresses .edit_address', '#registerFormAddress_data', '#delivery_addresses .delete_address').each(function(item) {
						 $(item).hide();
					 });
				}
				break;

			case 'confirmation':
				
				// mostrar el mensaje de "Tu pedido se ha ampliado con exito" en el confirmation
				$('order-confirmation').show();
				/* TODO: Necesitamos que back-end nos pasen un flag para saber cuando se ha reabierto el pedido */
				//$('reopen-order-confirmation').show();
				
				break;

		}
	},
	
	/**
	 * num total de pedidos que se pueden reabrir
	 */
	setTotalOrdersToReopen: function (i_total) {
		this.i_totalOrders = i_total;
	},
	
	/**
	 * Vacia la cesta que tiene en ese momento para agregar el producto actual
	 */
	submitEmptyCartForNewOrder: function (modal, modalother) {
		modalother.close();
		
		MH.submitEmptyCart('emptyCart', function(response) {
			MH.parseResponse(response);
			if(MH.statusOK()) {
				try {
					// reiniciar comprobacion reabrir pedido
					Reopen.resetData();
					Reopen.addToCart(0, modal, modalother);
				}
				catch(e) {
					if(this.debug) console.log(e);
				}
			}
			else {
				MH.endSubmitError();
			}
			MH.stopLoad();
			MH.stopTimeout();
		});
		
		return false;
	},
	
	/**
     * Metodo que realiza un submit enviando la id de la order
     * si es success redirecciona a la home de campanya
     * utilizado en orderview.tpl
     * */
    submitReopenOrder: function (orderPK, modal, modalother) {
		var submit = false;

		if(orderPK != '') {
			this.page = 'orderview';
			
			// si el boton no esta deshabilitado, podemos reabrir pedido
			if (!$('order-expand').hasClassName('disableButton')) {
				// guardamos el modal de pedido reabierto en memoria para abrirlo tras el submit
				this.modalReopen = modal;
				this.modalOtherReopened = modalother;

				// reabro el pedido
				this.callReopenOrder(orderPK, this.responseReopenOrder.bind(this));
			}
		}
	},
	
	/**
     * Metodo que realiza un submit enviando la id de la order
     * si es success redirecciona a la home de campanya
     * */
    submitReopenOrderAddProduct: function (orderPK, modal, modalother) {
		if(orderPK != '' && !$('divReopenBtn').hasClassName('disableButton')) {
			this.page = 'fittingroom';
			// guardamos el modal de pedido reabierto en memoria para abrirlo tras el submit
			this.modalReopen = modal;
			this.modalOtherReopened = modalother;

			// reabro el pedido
			this.callReopenOrder(orderPK, this.responseReopenOrderAddProduct.bind(this));
		}
	},
	
	/**
     * Metodo que realiza un submit desde el boton reabrir pedido del modal Cancelar (orderview)
     * enviando la id de la order si es success redirecciona a la home de campanya
     * */
	submitReopenOrderFromCancel: function (orderPK, modal, modalother) {

		// ++ esto es igual que submitReopenOrder() pero saltandonos la deshabilitacion del boton
		this.page = 'orderview';

		// guardamos el modal de pedido reabierto en memoria para abrirlo tras el submit
		this.modalReopen = modal;
		this.modalOtherReopened = modalother;

		// reabro el pedido
		this.callReopenOrder(orderPK, this.responseReopenOrder.bind(this));
	},
	
	/**
	 * Busca un elemento needle en el array pasado
	 * devuelve el propio needle, si lo ha encontrado
	 */
	_checkPage: function (v, needle) {
		var s_res = '';
		if(	v.indexOf(needle) >= 0) {
			s_res = needle;
		}
		
		return s_res;
	}
});/**
 *  prv.public.js
 * =========================================
 * @requieres: 	--
 * @revision: 	1.0
 */

/**
 * PagePublic - Common
 * =========================================
 * @modified: 	Marcos (20-06-11)
 */
 
 var PagePublic = new Class.create(PRV.Core.Page, {
    initialize: function() {
    	
    	this.setLoader(PRV.Core.Loader);
    },
    
    callUserLogged: function () {
    	var url = '/auth/isUserLogged';
    	this.Loader.call(url, this._endCallUserLogged.bind(this));
	},
	
	_endCallUserLogged: function (response) {
		this.Loader.endCall(response);
		
		var data = this.Loader.getResData();
		
		if(data.user_logged == "1") {
			PRV.Url.go("microsites");
		}
	},
    
    load: function () {
    	PRV.UI.load();
    }
});/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();/**
 * "Clase" para administrar el hash de la URL (la parte de la URL después del #).
 * @revision: 	1.0
 * @modified: 	Ignacio (15-06-2011)
 */
var UrlHash = {
	_listeners: [], // guarda las funciones que deben ser invocadas cuando el hash cambia
	
	_current: location.hash ? location.hash.substring(1) : '', // guarda el hash actual, para poder detectar cambios
	
	_interval: null, // guarda el intervalo de chequeo de cambios en la URL

	/**
	 * Añade una función que se invocará cuando se modifique la URL
	 * @param {Function} method - Función a invocar
	 * @param {Object} scope - (opcional) Objeto sobre el cual se invocará la función
	 */
	onChange: function(method, scope) {
		// añadir la función al array de listeners
		UrlHash._listeners.push({
			method: method,
			scope: scope
		});
	},
	
	/**
	 * Modifica el hash de la URL y dispara el evento onChange.
	 * @param {String} hash - Nuevo hash (sin la almohadilla '#').
	 */
	change: function(hash) {
		UrlHash._current = hash; // actualizar hash actual
		location.href = '#' + hash; // actualizar la URL (esta actualización de la URL no volverá a disparar el onChnage porque _current ya se ha actualizado)
		// notificar a los listeners
		for (var i=0; i < UrlHash._listeners.length; i++) {
			// obtener los parámetros del hash (ej: param1/value1/param2/value2, se traduce en, {param1: value1, param2: value2})
			var parts = hash.split("/");
			var params = {};
			for (var j=0; j < parts.length; j+=2) {
				params[decodeURIComponent(parts[j])] = decodeURIComponent(parts[j+1]);
			}
			// invocar la función
			UrlHash._listeners[i].method.call(UrlHash._listeners[i].scope, hash, params);
		}
	},
	
	/**
	 * Función que verifica si hay un cambio en la URL.
	 */
	checkChange: function() {
		var hash = UrlHash.getHashFromUrl();
		if (hash != UrlHash._current) {
			UrlHash.change(hash);
		}
	},
	
	/**
	 * Obtiene el hash de la URL.
	 * @return {String} Hash de la url.
	 */
	getHashFromUrl: function() {
		var h = location.href.indexOf('#'); 
		return h < 0 ? '' : location.href.substring(h + 1);
	},
	
	/**
	 * Inicia el monitoreo de cambios en la URL
	 */
	startMonitoring: function() {
		UrlHash._interval = setInterval(UrlHash.checkChange, 100);
	},
	
	/**
	 * Detiene el monitoreo de cambios en la URL.
	 */
	stopMonitoring: function() {
		if (UrlHash._interval) {
			clearInterval(UrlHash._interval);
		}
	}
};

UrlHash.startMonitoring();
/**
 * PrivaliaAddress - Spain
 * =========================================
 * @requieres:    common/privalia.addressbase.js
 * @modified:     Mike    (19-01-11)
 */
var PrivaliaAddress = new Class.create(PrivaliaAddressBase, {
    initialize: function($super) {
       $super();
       
       //version 
       this.version =				2.0;				//modificar version al crear un nuevo metodo
       this.setVersion(this.version, 'PrivaliaAddress');
    },

    setAddressInputs: function(pk) {
    	// cargar datos de la direccion al form
    	$('memaddress_adtype').value = $F(this.idAddressForm + '_adtype');
        $('memaddress_PK').value = pk;
        $('memaddress_street_type').value = $F(this.idAddressForm + '_street_type');
        $('memaddress_street_number_type').value = $F(this.idAddressForm + '_street_number_type');
        $('memaddress_name').value = $F(this.idAddressForm + '_name');
        $('memaddress_house_fraction').value = $F(this.idAddressForm + '_house_fraction');
        $('memaddress_house_floor').value = $F(this.idAddressForm + '_house_floor');
        $('memaddress_city').value = $F(this.idAddressForm + '_city');
        $('memaddress_phone').value = $F(this.idAddressForm + '_phone');
        $('memaddress_street_name').value = $F(this.idAddressForm + '_street_name');
        $('memaddress_street_number').value = $F(this.idAddressForm + '_street_number');
        $('memaddress_zipcode').value = $F(this.idAddressForm + '_zipcode');
        $('memaddress_state').value = $F(this.idAddressForm + '_state');
    },

    /**
     * Actualiza los datos de la direccion, cogiendo la info del formulario
     */
    reload: function () {
		var prefix =  this.idPrefixAddressStatic + this.s_addressPK + "_";
		var prefix2 =  this.idPrefixAddress + this.s_addressPK + "_";

		// actualizo los datos de la direccion que se muestra en el listado
		//var number_description = $('memaddress_adtype').options[$('memaddress_adtype').selectedIndex].innerHTML;
		var street_description = $('memaddress_street_type').options[$('memaddress_street_type').selectedIndex].innerHTML;
		var number_description = $('memaddress_street_number_type').options[$('memaddress_street_number_type').selectedIndex].innerHTML;

		if($(prefix + 'adtype') !== null) {
			var adtype = this.getAddressType($F('memaddress_adtype'));
			$(prefix + 'adtype').update(adtype);
		}
		
		$(prefix + 'street_name').update($F('memaddress_street_name'));
		$(prefix + 'street_description').update(street_description);
		$(prefix + 'street_number_description').update(number_description);
		$(prefix + 'street_number').update($F('memaddress_street_number'));
		$(prefix + 'house_fraction').update($F('memaddress_house_fraction'));
		$(prefix + 'house_floor').update($F('memaddress_house_floor'));
		$(prefix + 'zipcode').update($F('memaddress_zipcode'));
		$(prefix + 'city').update($F('memaddress_city'));
		$(prefix + 'state').update($F('memaddress_state'));

		// actualizo los datos de la direccion en los inputs ocultos para posteriormente volcarlos en el formulario de editar
		$(prefix2 + 'adtype').value = $F('memaddress_adtype');
		$(prefix2 + 'street_type').value = $F('memaddress_street_type');
		$(prefix2 + 'street_name').value = $F('memaddress_street_name');
		$(prefix2 + 'street_number_type').value = $F('memaddress_street_number_type');
		$(prefix2 + 'street_number').value = $F('memaddress_street_number');
		$(prefix2 + 'house_fraction').value = $F('memaddress_house_fraction');
		$(prefix2 + 'house_floor').value = $F('memaddress_house_floor');
		$(prefix2 + 'zipcode').value = $F('memaddress_zipcode');
		$(prefix2 + 'city').value = $F('memaddress_city');
		$(prefix2 + 'state').value = $F('memaddress_state');
		$(prefix2 + 'phone').value = $F('memaddress_phone');
		$(prefix2 + 'name').value = $F('memaddress_name');

    }
});/**
 * es/privalia.carrier.js
 * =========================================
 * @requieres:    -
 * @revision:     1.0
 * @modified:     Cristina	(17-12-10)
 */
var PrivaliaJsonKiala = Class.create(PrivaliaCarrierBase, {
    initialize: function($super){
        $super();
        
      //version 
        this.version =				1.0;				//modificar version al crear un nuevo metodo
        this.setVersion(this.version, 'PrivaliaJsonKiala');
    },

    /**
     * Recogemos el getData personalizado para Kiala
     */
    buildPage: function(generate){
        switch (generate) {
            case 'kiala':
            	// recogemos el objeto con los parametros json
            	var data = this.getResData();
            	// recogemos la url que enviaremos a kiala
            	this.getKialaUrl(data.carrier_data.url);
                break;
            default:
                // no se hace nada
        }
    },

    /**
	 * Recibe la url a la que enviaremos los parametros al server de kiala
	 */
	getKialaUrl: function(data) {
		this.s_sendUrlToKiala = data;
	}

});


/**
 * es/privalia.carrier.js
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, privalia.carrierbase.js
 * @revision: 	1.0
 * @modified: 	Cristina	(17-05-11)
 */
var PrivaliaKiala = Class.create(PrivaliaJsonKiala, {
    initialize: function($super){
        $super();

        this.hasKialaPointData = 		false;		// flag
        this.s_sendUrlToKiala =			'';			// url con parametros necesarios para enviar a kiala
		this.s_deliverPointUrl	=		'';			// url ya parseada y lista para enviar
		this.s_domainUrl =				URL_SECURE;			// url segun el pais
		this.s_primaryCarrier =			1;			// Numero que identifica a mrw
		this.s_secondaryCarrier =		30;			// Numero que identifica a kiala
	    this.s_urlMod =					'/myorder/changeDeliveryPoint/';// url a enviar para modificar un punto de recogida
	    
	    //version 
        this.version =				1.1;				//modificar version al crear un nuevo metodo
        this.setVersion(this.version, 'PrivaliaKiala');
    },


	/**
	 * Muestra dos opciones para elegir operador logistico
	 */
	buildPageCarrier: function(){
		// label del operador logistico por defecto (mrw)
		var firstCarrier = 'divCarrierMRW';
		// label de Kiala
		var secondCarrier = 'divCarrierKiala';

		// forzamos a string, por si viene en integer
		var idCarrier = this.getCarrier().toString();

		switch(idCarrier) {
	    	// KIALA
	    	case '30':
	    		// EN SUMMARY
	    		// se selecciona el radio button de kiala
				$('carrier_kiala').checked = true;
				// el foco queda encima del radio button
				$('carrier_kiala').focus();
	    		// muestra la div donde se vuelcan los datos escogidos del punto de entrega
				$('kiala_point').removeClassName('hidden');
				// oculta la tpl de direcciones y el link para anyadir direcciones
				$('delivery_addresses', 'registerFormAddress_data').invoke('addClassName', 'hidden');
				// elimina la clase active (anyade color #FFF al texto)
				$(firstCarrier).removeClassName('active');
				// anyade la clase active
				$(secondCarrier).addClassName('active');
	    		break;
	    	// MRW
	    	case '1': default:
	    		// EN SUMMARY
	    		// se selecciona el radio button de mrw
				$('carrier_mrw').checked = true;
				// el foco queda encima del radio button
				$('carrier_mrw').focus();
	    		// muestra la tpl de direcciones y el link para anyadir direcciones
				$('delivery_addresses', 'registerFormAddress_data').invoke('removeClassName', 'hidden');
				// oculta la div donde se vuelcan los datos escogidos del punto de entrega
				$('kiala_point').addClassName('hidden');
				// anyade la clase active
				$(firstCarrier).addClassName('active');
				// elimina la clase active (anyade color #FFF al texto)
				$(secondCarrier).removeClassName('active');
	    		break;
		}
	},

	/**
	 * Controla el operador logisitico escogido al hacer un reload y lo selecciona por defecto
	 */
	controlSelectedCarrier: function(data) {
		// volcamos el carrier seleccionado
		this.setCarrier(data.order_data.order_FK_carrier_PK);
		this.setHasKialaPoint();
		this.buildPageCarrier();
	},

    /**
     * Detecta el operador logistico escogido y procesa las acciones correspondientes
     */
    chooseCarrier: function(opt)
    {
    	// guardamos carrier
    	this.setCarrier(opt);

    	switch(opt) {
	    	// KIALA
	    	case '30':
	    		if(this.hasSelectedPoint()) {
	    			// selecciona la opcion kiala en la bb.dd
	        		this.callChangeCarrier(opt);
	    		}
	    		else {
	    			// muestra el modal con el mapa y los puntos Kiala
	        		this.showMap();
	    		}
	    		break;
	    	// MRW
	    	case '1': default:
	    		// selecciona la opcion mrw en la bb.dd
	    		this.callChangeCarrier(opt);
	    		break;
    	}

    	// controla las divs a ensenyar para mostrar el punto kiala escogido o mrw, y la opcion de modificarlo
    	this.buildPageCarrier(opt);
    },

	/**
	 * Procesa la url recibida por Kiala por un formato valido
	 */
	formatURL: function(url) {
		// se divide la url recibida por el parametro ?
		var divideUrl = url.split("?");

		// separamos por elementos la string que queremos excluir (divideUrl[1]) por el parametro &
		//var divideUrlElement = divideUrl[1].split("&");

		// sacamos el elemento que no nos interesa de la string resultante
		// 0= startIndex(elemento que elimina) 1= cuantos elementos hay que eliminar
		//divideUrlElement.splice(0,1);
		switch(this.s_page) {
			case 'summary':

				// concatenamos la string procesada con el valor que contiene el dominio
				var rawUrl = URL_SECURE+this.s_url+this.s_carrierName+"/"+this.s_secondaryCarrier+"?"+divideUrl[1];
				break;
			case 'orderview':

				// concatenamos la string procesada con el valor que contiene el dominio
				var rawUrl = URL_DOMAIN+this.s_urlMod+this.s_carrierName+"/"+this.s_secondaryCarrier+"?"+divideUrl[1];
				break;
		}

		// procesamos la string con el formato correcto
		// [,=] = son los caracteres que sustituiremos por /
		//var definitiveUrl = rawUrl.replace(/[,=]/gi,'/');

		// devolvemos la url resultante
		return rawUrl;
	},
	/**
	 * Recibe la url enviada por Kiala con el punto de recogida escogido
	 */
	getKialaResponse: function(backUrl) {
		// se procesa para obtener la url parseada
		this.s_deliverPointUrl = this.formatURL(backUrl);

		switch(this.s_page) {
			case 'summary':
				// se envia la url definitiva
				this.sendDeliverPointUrl();
				break;
			case 'orderview':
				this.setConfirmationPoint();
				// TODO Dani: hay que optimizar la apertura y cieere de modals
				mdlAcceptKiala.open();
				//mdlKiala.close();
				break;
		}
	},

	/**
	 * Controla si ya se ha escogido un punto Kiala para la entrega
	 */
	hasSelectedPoint: function () {
		return this.hasKialaPointData;
	},

	/**
	 * Cierra el modal del mapa con los puntos Kiala y selecciona mrw por defecto
	 */
	hideMap: function (modal) {
		// si no se ha escogido un punto Kiala
		if(!this.hasSelectedPoint() && this.s_page=='summary') {
			// pasamos el valor 1 que corresponde a MRW
			this.chooseCarrier('1');
			// se selecciona el radio button de mrw
			$('carrier_mrw').checked = true;
			// el foco queda encima del radio button
			$('carrier_mrw').focus();
			// cierra la modal
			modal.close();
		}
		else {
			modal.close();
		}
	},
	/**
    * Recibe el valor del operador logistico secundario (true/false)
    */
	kialaIsAvailable: function(data){
		   // volcamos el gedata de la pagina cargada
		   this.pageData = data;
		   // volcamos el valor booleano
		   switch(this.s_page) {
			   case 'summary':
			   		this.b_secondaryCarrier = data.campaign_data.campaign_carriers.kiala;
			   		break;
			   case 'orderview':
				   this.b_secondaryCarrier = data.order_data.order_FK_carrier_PK;
				   if(this.b_secondaryCarrier=="30"){
					   this.b_secondaryCarrier = true;
				   }
				   else this.b_secondaryCarrier = false;
				   break;
			   case 'confirmation':
				   this.b_secondaryCarrier = data.order_data.order_FK_carrier_PK;
				   if(this.b_secondaryCarrier=="30"){
					   this.b_secondaryCarrier = true;
				   }
				   else this.b_secondaryCarrier = false;
				   break;
		   }

		   // ejecutamos el metodo que prepara la tpl
		   this.changeCarrier();

		   // devolvemos el valor booleano
		   return this.b_secondaryCarrier;
	   },
	/**
	 * Envio de url con el punto de recogida modificado
	 */
	modDeliverPointUrl: function () {
		// se pasa la url a enviar
		var url = this.s_deliverPointUrl;
		// enviamos el dato
		new Ajax.Request(url, {
			onComplete: (function(response) {
				this.parseResponse(response);
				if(this.statusOK()) {
					// cerramos el modal del mapa
					// TODO Dani: hay que optimizar la apertura y cieere de modals
					mdlAcceptKiala.close();
					reloadOrderview();
				}
				else {
					// no hacemos nada
				}
			}).bind(this)
		});
	},


	/**
	 * Notificacion a la bbdd de cambio de punto de entrega
	 */
	modifyCarrier: function (url) {
		if(Object.isUndefined(url)){
		// se pasa la url a enviar para mrw sino sera para cualquier otro operador logistico
		var url = this.s_url+this.s_carrierName+"/"+this.s_primaryCarrier;
		}
		// enviamos el dato
		new Ajax.Request(url, {
			onComplete: (function(response) {
				this.parseResponse(response);
				if(this.statusOK()) {
					// no hacer nada
				}
				else {
					// no hacer nada
				}
			}).bind(this)
		});
	},

	/**
	 * Envio de url con el punto de recogida elegido
	 */
	sendDeliverPointUrl: function () {
		// se pasa la url a enviar
		var url = this.s_deliverPointUrl;
		// enviamos el dato
		new Ajax.Request(url, {
			onComplete: (function(response) {
				this.parseResponse(response);
				if(this.statusOK()) {
					// cambiamos el valor del flag
					this.hasKialaPointData = true;
					// cerramos el modal del mapa
					var modalToClose = mdlKiala;
					this.hideMap(modalToClose);
					// recargamos la pagina del summary
					reloadSummary();
				}
				else {
					// no hacemos nada
				}
			}).bind(this)
		});
	},

	/**
	 * Volcado de los datos del punto de entrega kiala
	 */
	setAddress: function (name, street, city, zipcode) {
		$('k_name').update(name);
		$('k_street').update(street);
		$('k_city').update(city);
		$('k_zipcode').update(zipcode);
	},

	/**
	 * Prepara los datos para el modal de aceptar cambio de punto de entrega
	 */
	setConfirmationPoint: function() {
		url = this.s_deliverPointUrl;
		//Limpiamos la URL de caracteres innecesarios
		var UrlTmp = url.replace(/[+]/gi,' ');
		this.urlOk = UrlTmp.replace('%2C',',');
		//Prepararamos los datos del nuevo punto de entrega para el modal de cambio de punto
		this._setNewPoint();
		//Prepararamos los datos del antiguo punto de entrega para el modal de cambio de punto
		this._setOldPoint();
	},

	/**
	 * Comprobamos inicialmente desde el Data, si tiene un punto kiala
	 */
	setHasKialaPoint: function() {
		// volcamos el getData del summary
		var data = this.pageData;
		// almacenamos los datos del punto kiala escogido
		var kialaAddress = data.order_data.kiala_data;
		// recoge el integer que corresponde al ultimo operador logistico escogido
		var carrier = data.order_data.order_FK_carrier_PK;
		// si la variable kiala_data existe(true, es que contiene una direccion ya escogida) y el operador logistico es kiala u otro
		if(!Object.isUndefined(kialaAddress) && carrier == 30 || !Object.isUndefined(kialaAddress) && carrier == 1){
			// pasamos el flag a true porque existe una direccion
			this.hasKialaPointData = true;
		}
		else{
			// sino a false
			this.hasKialaPointData = false;
		}
		// retornamos el valor
		return this.hasKialaPointData;
	},
	setUrlToKiala: function() {
		var url=  this.s_sendUrlToKiala;
		var dataUrl = this.pageData;
		switch(this.s_page) {
			case 'summary':
				if(this.hasSelectedPoint()){
					var zip = dataUrl.order_data.kiala_data.kp_zipcode;
					var url=  this.s_sendUrlToKiala+"&zip="+zip;
				}
			break;
			case 'orderview':
				var zip = dataUrl.order_data.ordel_zipcode;
				var url=  this.s_sendUrlToKiala+"&zip="+zip;
			break;
		}
		return url;
	},
	/**
	 * Construye el iframe con los datos necesarios y lo ensenya en una modal
	 */
	showMap: function() {
		// se monta el iframe con los parametros necesarios
		kialaIframe = new Element('iframe',{
			'id':'kialaDeliverPoint',
			'src': this.setUrlToKiala(),
			'width': 900,
			'height': 460,
			'frameborder': 0,
			'marginwidth': 0
		});
		// se vuelca el contenido del iframe dentro de la div contenedora
		$('modalKialaBody').update(kialaIframe);
		// se abre la modal
		// TODO Fede: esto no esta permitido. se ha de optimizar
		mdlKiala.open();
	},
	/**
	 * Prepara los datos del nuevo punto de entrega para el modal de cambio de punto
	 */
	_setNewPoint: function() {
		//Extraemos de la URL los campos necesarios

		this.s_kpnameTmp = this.urlOk.split("kpname=")[1];	
		this.s_kpname = this.s_kpnameTmp.split("&")[0];
		
		this.s_streetTmp = this.urlOk.split("street=")[1];		
		this.s_street = decodeURIComponent(this.s_streetTmp.split("&")[0]);		
		
		
		this.s_zipTmp = this.urlOk.split("zip=")[1];	
		this.s_zip = this.s_zipTmp.split("&")[0];
		
		
		this.s_cityTmp = this.urlOk.split("city=")[1];
		this.s_city = decodeURIComponent(this.s_cityTmp.split("&")[0]);
	
		
		//Volcamos los datos del punto escogido
		$('newpoint_kpname_tmp').update(this.s_kpname);
		$('newpoint_street_tmp').update(this.s_street);
		$('newpoint_zip_tmp').update(this.s_zip);
		$('newpoint_city_tmp').update(this.s_city);

	},
	/**
	 * Prepara los datos del antiguo punto de entrega para el modal de cambio de punto
	 */
	_setOldPoint: function() {
		//Recuperamos los datos del punto antiguo
		var dataOrder = this.pageData;
		this.point_name = dataOrder.order_data.ordel_collection_point_name;
		this.street_name = dataOrder.order_data.ordel_street_name;
		this.street_number = dataOrder.order_data.ordel_street_number;
		this.zipcode = dataOrder.order_data.ordel_zipcode;
		this.city = dataOrder.order_data.ordel_city;

		//Volcamos los datos del punto antiguo
		$('oldPointName').update(this.point_name);
		$('oldStreetName').update(this.street_name);
		$('oldStreetNumber').update(this.street_number);
		$('oldZipCode').update(this.zipcode);
		$('oldCity').update(this.city);
	}


});/**
 * PrivaliaCountry - Spain
 * =========================================
 * @modified:     Dani (8-06-11)
 */
var PrivaliaCountry = new Class.create(PrivaliaCountryBase,{
    initialize: function($super, isoCountry) {
       $super(isoCountry);
       this.b_logistic_carrier = true;	// permite utilizar mas operadores logisiticos si los hubiese
       this.b_co_register = false;		// activamos/desactivamos el co-registro
       this.b_offers_groupalia = true;	// se activa las oferta de groupalia para españa
       this.b_oneclick_payment = 	true;			// compra en un click
       this.s_citiesOffersGroupalia = "madrid,barcelona";  //ciudades que proporcionan ofertas
       this.s_keyAnalytics =		'UA-5826354-1';			// key del Google Analytics

		this.bSocial = 				true;			// social module is active for this country
		
     //version
		this.version =				2.2;				//modificar version al crear un nuevo metodo
       this.setVersion(this.version, 'PrivaliaCountry');
    },

    /**
     * Función que comprueba si el codigo postal introducido corresponde con el de la provincia. Para ello se usa un array
     * auxiliar en la que se establecen los dos primeros caracteres del codigo postal de la provincial.
     * Comentamos de momento el código postal correspondiente a Ceuta y Melilla pues no se hacen envios a dichas
     * provincias.
     * @params integer i_postalCode. Codigo postal.
     * @returns integer 		0 si no se encontra el codigo postal (0)
     *							1 si el codigo postal es de una provincia a la que no se envia
     *
     */
    getProvinceFromPostalCode: function(i_postalCode) {

    	if (i_postalCode.length != 5) return 0;
    	else if (!this._isUnsignedInteger(i_postalCode)) return 0; // Comprobamos que son enteros sin signo.

    	i_postalCodeTwoDigits = i_postalCode.substring(0, 2);

    	var st_postalCodeInit = new Array();
    	var st_postalCodeNoShipments = new Array();

    	st_postalCodeInit['01'] = 'Álava';
    	st_postalCodeInit['02'] = 'Albacete';
    	st_postalCodeInit['03'] = 'Alicante';
    	st_postalCodeInit['04'] = 'Almería';
    	st_postalCodeInit['33'] = 'Asturias';
    	st_postalCodeInit['05'] = 'Ávila';
    	st_postalCodeInit['06'] = 'Badajoz';
    	st_postalCodeInit['08'] = 'Barcelona';
    	st_postalCodeInit['09'] = 'Burgos';
    	st_postalCodeInit['10'] = 'Cáceres';
    	st_postalCodeInit['11'] = 'Cádiz';
    	st_postalCodeInit['39'] = 'Cantabria';
    	st_postalCodeInit['12'] = 'Castellón';
    	//st_postalCodeInit['51'] = 'Ceuta';
    	st_postalCodeInit['13'] = 'Ciudad Real';
    	st_postalCodeInit['14'] = 'Córdoba';
    	st_postalCodeInit['15'] = 'A Coruña';
    	st_postalCodeInit['16'] = 'Cuenca';
    	st_postalCodeInit['17'] = 'Girona';
    	st_postalCodeInit['18'] = 'Granada';
    	st_postalCodeInit['19'] = 'Guadalajara';
    	st_postalCodeInit['20'] = 'Guipúzcoa';
    	st_postalCodeInit['21'] = 'Huelva';
    	st_postalCodeInit['22'] = 'Huesca';
    	st_postalCodeInit['07'] = 'Illes Ballears';
    	st_postalCodeInit['23'] = 'Jaén';
    	st_postalCodeInit['24'] = 'León';
    	st_postalCodeInit['25'] = 'Lleida';
    	st_postalCodeInit['27'] = 'Lugo';
    	st_postalCodeInit['28'] = 'Madrid';
    	st_postalCodeInit['29'] = 'Málaga';
    	//st_postalCodeInit['52'] = 'Melilla';
    	st_postalCodeInit['30'] = 'Murcia';
    	st_postalCodeInit['31'] = 'Navarra';
    	st_postalCodeInit['32'] = 'Ourense';
    	st_postalCodeInit['34'] = 'Palencia';
    	st_postalCodeInit['35'] = 'Las Palmas';
    	st_postalCodeInit['36'] = 'Pontevedra';
    	st_postalCodeInit['26'] = 'La Rioja';
    	st_postalCodeInit['37'] = 'Salamanca';
    	st_postalCodeInit['38'] = 'Santa Cruz de Tenerife';
    	st_postalCodeInit['40'] = 'Segovia';
    	st_postalCodeInit['41'] = 'Sevilla';
    	st_postalCodeInit['42'] = 'Soria';
    	st_postalCodeInit['43'] = 'Tarragona';
    	st_postalCodeInit['44'] = 'Teruel';
    	st_postalCodeInit['45'] = 'Toledo';
    	st_postalCodeInit['46'] = 'Valencia';
    	st_postalCodeInit['47'] = 'Valladolid';
    	st_postalCodeInit['48'] = 'Vizcaya';
    	st_postalCodeInit['49'] = 'Zamora';
    	st_postalCodeInit['50'] = 'Zaragoza';

    	st_postalCodeNoShipments['51'] = 'Ceuta';
    	st_postalCodeNoShipments['52'] = 'Melilla';
//    	st_postalCodeNoShipments['35'] = 'Las Palmas';
//    	st_postalCodeNoShipments['38'] = 'Santa Cruz de Tenerife';

    	if(typeof(st_postalCodeInit[i_postalCodeTwoDigits]) == 'string') {
    		return st_postalCodeInit[i_postalCodeTwoDigits];
    	} else if (typeof(st_postalCodeNoShipments[i_postalCodeTwoDigits]) == 'string') {
    		return 1;
    	} else {
    		return 0;
    	}


    },

    getCitiesOffersGroupalia: function() {
    	return this.s_citiesOffersGroupalia;
    }
});
var Country = new PrivaliaCountry('es');/**
 *  privalia.payment.js - Es
 * =========================================
 * @requieres: 	00-protoaculous.1.8.3.min.js, privalia.payment.base.js
 * @revision: 	1.0
 */

/**
 * PrivaliaPayment - Es
 * =========================================
 * @modified: 	Marcos		(28-04-11)
 */
var PrivaliaPayment = Class.create(PrivaliaPaymentBase, {
	initialize: function($super) {
		$super();
		
		//version
	   	this.version =				1.0;				//modificar version al crear un nuevo metodo
	   	this.setVersion(this.version, 'PrivaliaPayment');
	}
	
});
